Muennighoff commited on
Commit
66db7e7
1 Parent(s): 004807c

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - moe
7
+ - olmo
8
+ - olmoe
9
+ co2_eq_emissions: 0
10
+ ---
11
+
12
+ ![olmoe](https://github.com/allenai/OLMoE/blob/main/visuals/logo/OLMoE_4.png?raw=true)
13
+
14
+ # Model Summary
15
+
16
+ > OLMoE is a ...
17
+
18
+ Links to all resources & instructions to reproduce: https://github.com/allenai/OLMoE
19
+
20
+ # Use
21
+
22
+ Install the `transformers` & `torch` libraries and run:
23
+
24
+ ```python
25
+ from transformers import OlmoeForCausalLM, AutoTokenizer
26
+ import torch
27
+
28
+ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
29
+
30
+ # Load different ckpts via passing e.g. `revision=step10000-tokens41B`
31
+ model = OlmoeForCausalLM.from_pretrained("OLMoE/OLMoE-1B-7B-0824").to(DEVICE)
32
+ tokenizer = AutoTokenizer.from_pretrained("OLMoE/OLMoE-1B-7B-0824")
33
+ inputs = tokenizer("Bitcoin is", return_tensors="pt")
34
+ inputs = {k: v.to(DEVICE) for k, v in inputs.items()}
35
+ out = model.generate(**inputs, max_length=64)
36
+ print(tokenizer.decode(out[0]))
37
+ # > # 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
38
+ ```
39
+
40
+ You can list all revisions/branches by installing `huggingface-hub` & running:
41
+ ```python
42
+ from huggingface_hub import list_repo_refs
43
+ out = list_repo_refs("OLMoE/OLMoE-1B-7B-0824")
44
+ branches = [b.name for b in out.branches]
45
+ ```
46
+
47
+ # Citation
48
+
49
+ ```bibtex
50
+ TODO
51
+ ```