minor
Browse files
README.md
CHANGED
@@ -110,7 +110,7 @@ assert transformers.__version__ >= MIN_TRANSFORMERS_VERSION, f'Please upgrade tr
|
|
110 |
|
111 |
# init
|
112 |
tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-Base-INCITE-2.8B-v1")
|
113 |
-
model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-Base-INCITE-2.8B-v1", torch_dtype=torch.
|
114 |
# infer
|
115 |
prompt = "Alan Turing is"
|
116 |
inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
|
@@ -122,11 +122,11 @@ token = outputs.sequences[0, input_length:]
|
|
122 |
output_str = tokenizer.decode(token)
|
123 |
print(output_str)
|
124 |
"""
|
125 |
-
|
126 |
"""
|
127 |
```
|
128 |
|
129 |
-
Please note that since `LayerNormKernelImpl` is not implemented in fp16 for CPU, we use
|
130 |
|
131 |
# Uses
|
132 |
|
|
|
110 |
|
111 |
# init
|
112 |
tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-Base-INCITE-2.8B-v1")
|
113 |
+
model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-Base-INCITE-2.8B-v1", torch_dtype=torch.bfloat16)
|
114 |
# infer
|
115 |
prompt = "Alan Turing is"
|
116 |
inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
|
|
|
122 |
output_str = tokenizer.decode(token)
|
123 |
print(output_str)
|
124 |
"""
|
125 |
+
a name that is synonymous with the history of computer science. As the man who invented the Turing machine, the mathematical model that defines the limits of what can be computed, Turing is credited with the invention of the modern computer. Turing was also a mathematician and logician, and his work in these fields led to the development of the field of artificial intelligence...
|
126 |
"""
|
127 |
```
|
128 |
|
129 |
+
Please note that since `LayerNormKernelImpl` is not implemented in fp16 for CPU, we use `bfloat16` for CPU inference.
|
130 |
|
131 |
# Uses
|
132 |
|