RuVI-AI
/

ArushCodes commited on
Commit
ea2ef4c
·
verified ·
1 Parent(s): e98c009

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -8
README.md CHANGED
@@ -134,14 +134,16 @@ Engram adds a hashed n-gram lookup at layers 1 and 8. Token sequences are compre
134
 
135
  ## Quick start
136
 
 
 
137
  The model and tokenizer load through `transformers` with remote code. Batched generation with padding is not supported yet, so generate one prompt at a time.
138
 
139
  ```python
140
  from transformers import AutoTokenizer, AutoModelForCausalLM
141
 
142
- repo = "RuVI-AI/Pragya-EXP2"
143
  tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
144
- model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True).eval()
145
 
146
  inputs = tok("The Internet is", return_tensors="pt")
147
  out = model.generate(
@@ -151,6 +153,8 @@ out = model.generate(
151
  do_sample=True,
152
  temperature=0.7,
153
  top_k=20,
 
 
154
  use_cache=False,
155
  pad_token_id=tok.pad_token_id,
156
  )
@@ -159,19 +163,34 @@ print(tok.decode(out[0], skip_special_tokens=True))
159
 
160
  The tokenizer prepends `<|bos|>` by default. The string `<|bos|>` inside a prompt is treated as ordinary text.
161
 
162
- ---
 
 
 
 
 
 
 
 
 
 
 
 
163
 
164
  ## Sampling
165
 
166
- At this size, use tight sampling:
167
 
168
  ```text
169
- temperature 0.6 – 0.9
170
- top_k 20 – 50
171
- repetition_penalty 1.2 – 1.4
 
172
  ```
173
 
174
- ---
 
 
175
 
176
  ## Capabilities
177
 
 
134
 
135
  ## Quick start
136
 
137
+ Install: `pip install torch transformers safetensors`
138
+
139
  The model and tokenizer load through `transformers` with remote code. Batched generation with padding is not supported yet, so generate one prompt at a time.
140
 
141
  ```python
142
  from transformers import AutoTokenizer, AutoModelForCausalLM
143
 
144
+ repo = "RuVI-AI/Pragya-EXP2" # or a local folder
145
  tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
146
+ model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True).to("cpu").eval()
147
 
148
  inputs = tok("The Internet is", return_tensors="pt")
149
  out = model.generate(
 
153
  do_sample=True,
154
  temperature=0.7,
155
  top_k=20,
156
+ repetition_penalty=1.3,
157
+ no_repeat_ngram_size=3,
158
  use_cache=False,
159
  pad_token_id=tok.pad_token_id,
160
  )
 
163
 
164
  The tokenizer prepends `<|bos|>` by default. The string `<|bos|>` inside a prompt is treated as ordinary text.
165
 
166
+ ### Expected load output
167
+
168
+ Loading prints a `LOAD REPORT` listing `model.lm_head.weight` as `MISSING`. This is expected. The checkpoint stores the embedding once, and the head is tied to it when the model loads. Check it with:
169
+
170
+ ```python
171
+ print("tied:", model.model.transformer.wte.weight is model.model.lm_head.weight)
172
+ ```
173
+
174
+ It should print `True`.
175
+
176
+ ### Hub download messages
177
+
178
+ On first load, Transformers prints "A new version of the following files was downloaded". This is the remote code being fetched, not an error. Pin a `revision=` to avoid the message once you have a version you trust.
179
 
180
  ## Sampling
181
 
182
+ These settings produced fluent, on-topic output in testing:
183
 
184
  ```text
185
+ temperature 0.7
186
+ top_k 20
187
+ repetition_penalty 1.3
188
+ no_repeat_ngram 3
189
  ```
190
 
191
+ Greedy decoding (`do_sample=False`) repeats phrases after a few sentences. Use sampling.
192
+
193
+ The model writes in a simple, children's-book register. This reflects the TinyStories-heavy data mix rather than a bug.
194
 
195
  ## Capabilities
196