TerenceLau commited on
Commit
c978865
·
verified ·
1 Parent(s): 8fe1f72

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -1
README.md CHANGED
@@ -21,4 +21,19 @@ language:
21
  <image src="https://raw.githubusercontent.com/TerenceLiu98/sparrow/master/.github/sparrow.png" width="300" />
22
  </div>
23
 
24
- For more detail pleace check: [Sparrow](https://github.com/TerenceLiu98/sparrow)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  <image src="https://raw.githubusercontent.com/TerenceLiu98/sparrow/master/.github/sparrow.png" width="300" />
22
  </div>
23
 
24
+ For more detail pleace check: [Sparrow](https://github.com/TerenceLiu98/sparrow)
25
+
26
+ To run the model, first download the code from huggingface:
27
+
28
+ ```bash
29
+ git clone https://huggingface.co/TerenceLau/sparrow && cd ./sparrow/
30
+ ```
31
+
32
+ then, you can register the `SparrowConfig` and `SparrowModel` to `AutoConfig` and `AutoModelForCausalLM`:
33
+ ```python
34
+ from modelling_sparrow import SparrowModel, SparrowConfig
35
+ from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
36
+ AutoConfig.register("sparrow", SparrowConfig)
37
+ AutoModelForCausalLM.register(SparrowConfig, SparrowModel)
38
+ model = AutoModelForCausalLM.from_pretrained("TerenceLau/sparrow")
39
+ ```