Xenova HF staff commited on
Commit
6ea7a6b
·
verified ·
1 Parent(s): b550f81

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -0
README.md CHANGED
@@ -11,6 +11,25 @@ tags: []
11
 
12
  ## Model Details
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ### Model Description
15
 
16
  <!-- Provide a longer summary of what this model is. -->
 
11
 
12
  ## Model Details
13
 
14
+ ### Code to generate model
15
+
16
+ ```py
17
+ from transformers import GraniteConfig, GraniteForCausalLM, AutoTokenizer
18
+
19
+ model = GraniteForCausalLM(GraniteConfig(
20
+ hidden_size=32,
21
+ intermediate_size=64,
22
+ num_attention_heads=4,
23
+ num_hidden_layers=2,
24
+ num_key_value_heads=4,
25
+ pad_token_id=0,
26
+ ))
27
+ tokenizer = AutoTokenizer.from_pretrained('ibm/PowerLM-3b')
28
+
29
+ model.push_to_hub('hf-internal-testing/tiny-random-GraniteForCausalLM')
30
+ tokenizer.push_to_hub('hf-internal-testing/tiny-random-GraniteForCausalLM')
31
+ ```
32
+
33
  ### Model Description
34
 
35
  <!-- Provide a longer summary of what this model is. -->