xzyao commited on
Commit
bc93ec2
1 Parent(s): a74d650
Files changed (1) hide show
  1. README.md +3 -3
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.float32)
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
- one of the most famous people to have come out of Cambridge. He is also one of the most famous people to have been arrested for homosexuality.
126
  """
127
  ```
128
 
129
- Please note that since `LayerNormKernelImpl` is not implemented in fp16 for CPU, we use fp32 for CPU inference.
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