shanearora commited on
Commit
908028f
1 Parent(s): ad49166

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -12
README.md CHANGED
@@ -32,14 +32,14 @@ The core models released in this batch are the following:
32
 
33
  To load a specific model revision with HuggingFace, simply add the argument `revision`:
34
  ```bash
35
- olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-7B-hf", revision="step1000-tokens4B")
36
  ```
37
 
38
  All revisions/branches are listed in the file `revisions.txt`.
39
  Or, you can access all the revisions for the models via the following code snippet:
40
  ```python
41
  from huggingface_hub import list_repo_refs
42
- out = list_repo_refs("allenai/OLMo-1.7-7B-hf")
43
  branches = [b.name for b in out.branches]
44
  ```
45
 
@@ -62,15 +62,13 @@ branches = [b.name for b in out.branches]
62
  - Evaluation code: https://github.com/allenai/OLMo-Eval
63
  - Further fine-tuning code: https://github.com/allenai/open-instruct
64
  - **Paper:** [Link](https://arxiv.org/abs/2402.00838)
65
- - **W&B Logs:** [pretraining](https://wandb.ai/ai2-llm/OLMo-7B/groups/OLMo-1.7-7B), [annealing](https://wandb.ai/ai2-llm/OLMo-7B/groups/OLMo-1.7-7B-anneal)
66
 
67
  ## Uses
68
 
69
  ### Inference
70
 
71
- Install Transformers [from source](https://huggingface.co/docs/transformers/en/installation#install-from-source), or update to the next version when this [PR](https://github.com/huggingface/transformers/pull/29890) is integrated.
72
-
73
- Now, proceed as usual with HuggingFace:
74
  ```python
75
  from transformers import AutoModelForCausalLM, AutoTokenizer
76
  olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-1B-hf")
@@ -95,12 +93,6 @@ print(olmo_pipe("Language modeling is "))
95
  Or, you can make this slightly faster by quantizing the model, e.g. `AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-1B-hf", torch_dtype=torch.float16, load_in_8bit=True)` (requires `bitsandbytes`).
96
  The quantized model is more sensitive to typing / cuda, so it is recommended to pass the inputs as `inputs.input_ids.to('cuda')` to avoid potential issues.
97
 
98
- Note, you may see the following error if `ai2-olmo` is not installed correctly, which is caused by internal Python check naming. We'll update the code soon to make this error clearer.
99
- ```bash
100
- raise ImportError(
101
- ImportError: This modeling file requires the following packages that were not found in your environment: hf_olmo. Run `pip install hf_olmo`
102
- ```
103
-
104
  ### Fine-tuning
105
  Model fine-tuning can be done from the final checkpoint (the `main` revision of this model) or many intermediate checkpoints. Two recipes for tuning are available.
106
  1. Fine-tune with the OLMo repository:
 
32
 
33
  To load a specific model revision with HuggingFace, simply add the argument `revision`:
34
  ```bash
35
+ olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-1B-hf", revision="step1000-tokens2B")
36
  ```
37
 
38
  All revisions/branches are listed in the file `revisions.txt`.
39
  Or, you can access all the revisions for the models via the following code snippet:
40
  ```python
41
  from huggingface_hub import list_repo_refs
42
+ out = list_repo_refs("allenai/OLMo-1.7-1B-hf")
43
  branches = [b.name for b in out.branches]
44
  ```
45
 
 
62
  - Evaluation code: https://github.com/allenai/OLMo-Eval
63
  - Further fine-tuning code: https://github.com/allenai/open-instruct
64
  - **Paper:** [Link](https://arxiv.org/abs/2402.00838)
65
+ <!-- - **W&B Logs:** [pretraining](https://wandb.ai/ai2-llm/OLMo-7B/groups/OLMo-1.7-7B), [annealing](https://wandb.ai/ai2-llm/OLMo-7B/groups/OLMo-1.7-7B-anneal) -->
66
 
67
  ## Uses
68
 
69
  ### Inference
70
 
71
+ Install Transformers. Then proceed as usual with HuggingFace:
 
 
72
  ```python
73
  from transformers import AutoModelForCausalLM, AutoTokenizer
74
  olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-1B-hf")
 
93
  Or, you can make this slightly faster by quantizing the model, e.g. `AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-1B-hf", torch_dtype=torch.float16, load_in_8bit=True)` (requires `bitsandbytes`).
94
  The quantized model is more sensitive to typing / cuda, so it is recommended to pass the inputs as `inputs.input_ids.to('cuda')` to avoid potential issues.
95
 
 
 
 
 
 
 
96
  ### Fine-tuning
97
  Model fine-tuning can be done from the final checkpoint (the `main` revision of this model) or many intermediate checkpoints. Two recipes for tuning are available.
98
  1. Fine-tune with the OLMo repository: