Muennighoff commited on
Commit
8da7e16
1 Parent(s): 783d931

Update prompt

Browse files
Files changed (1) hide show
  1. README.md +11 -4
README.md CHANGED
@@ -32,11 +32,18 @@ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
32
  # Load different ckpts via passing e.g. `revision=kto`
33
  model = OlmoeForCausalLM.from_pretrained("allenai/OLMoE-1B-7B-0924-Instruct").to(DEVICE)
34
  tokenizer = AutoTokenizer.from_pretrained("allenai/OLMoE-1B-7B-0924-Instruct")
35
- message = [{"role": "user", "content": "Explain to me like I'm five what is Bitcoin."}]
36
- inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
37
- out = model.generate(**inputs, max_length=64)
38
  print(tokenizer.decode(out[0]))
39
- # > # Bitcoin is a digital currency that is created and held electronically. No one controls it. Bitcoins aren’t printed, like dollars or euros – they’re produced by people and businesses running computers all around the world, using software that solves mathematical
 
 
 
 
 
 
 
40
  ```
41
 
42
  Branches:
 
32
  # Load different ckpts via passing e.g. `revision=kto`
33
  model = OlmoeForCausalLM.from_pretrained("allenai/OLMoE-1B-7B-0924-Instruct").to(DEVICE)
34
  tokenizer = AutoTokenizer.from_pretrained("allenai/OLMoE-1B-7B-0924-Instruct")
35
+ messages = [{"role": "user", "content": "Explain to me like I'm five what is Bitcoin."}]
36
+ inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(DEVICE)
37
+ out = model.generate(inputs, max_length=100)
38
  print(tokenizer.decode(out[0]))
39
+ """
40
+ <|endoftext|><|user|>
41
+ Explain to me like I'm five what is Bitcoin.
42
+ <|assistant|>
43
+ Bitcoin is like a special kind of money that you can use to buy things online. But unlike regular money, like dollars or euros, Bitcoin isn't printed by governments or banks. Instead, it's created by a special computer program that helps people keep track of it.
44
+
45
+ Here's how it works: imagine you have a bunch of toys, and you want to
46
+ """
47
  ```
48
 
49
  Branches: