lyonsn4 commited on
Commit
df43de5
·
verified ·
1 Parent(s): cf4f7b7

Card: document generation parameters (repetition_penalty, no_repeat_ngram_size, temperature, top_p, max_new_tokens) + overrides

Browse files
Files changed (1) hide show
  1. README.md +32 -0
README.md CHANGED
@@ -43,6 +43,38 @@ The decoder also accepts `inputs_embeds` (exactly one of `input_ids` / `inputs_e
43
  vision projector can splice visual tokens in — usable as a small VLM text backbone. A raw
44
  PyTorch checkpoint (`pytorch_model.pth`) is included alongside the safetensors weights.
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  ## Benchmarks
47
 
48
  Accuracy (%) via [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness)
 
43
  vision projector can splice visual tokens in — usable as a small VLM text backbone. A raw
44
  PyTorch checkpoint (`pytorch_model.pth`) is included alongside the safetensors weights.
45
 
46
+ ## Generation parameters
47
+
48
+ The repo ships sensible defaults in `generation_config.json`, so a bare
49
+ `model.generate(ids)` already applies them — you don't need to pass anything. At **27M
50
+ parameters** the model can loop across sentences, so the defaults enable repetition control:
51
+
52
+ | Parameter | Default | What it does / when to change |
53
+ |---|---|---|
54
+ | `repetition_penalty` | `1.3` | Penalises tokens already generated. **The main lever against this model's multi-sentence looping.** Try `1.1`–`1.4`; `1.0` disables it (you'll see more repetition); >`1.5` starts to sound unnatural. |
55
+ | `no_repeat_ngram_size` | `3` | Hard-blocks any 3-gram from repeating. Belt-and-braces with `repetition_penalty`. Set `0` to disable, `2` for stricter (can hurt fluency on short replies). |
56
+ | `temperature` | `0.7` | Sampling randomness. Lower (`0.3`–`0.5`) = more focused/repetitive; higher (`0.9`–`1.1`) = more varied but more likely to go off-topic at this size. |
57
+ | `top_p` | `0.9` | Nucleus sampling cutoff. Lower (`0.8`) tightens word choice; `1.0` allows the full distribution. |
58
+ | `max_new_tokens` | `200` | Length cap. This model is strongest in **short** replies; long generations drift — keep it small (`64`–`200`) for best quality. |
59
+ | `do_sample` | `True` | `False` = deterministic greedy decoding (reproducible; combine with `repetition_penalty` to avoid greedy loops). |
60
+
61
+ Override any of them per call to experiment:
62
+
63
+ ```python
64
+ out = model.generate(
65
+ ids,
66
+ max_new_tokens=120,
67
+ do_sample=True,
68
+ temperature=0.6, # more focused
69
+ top_p=0.9,
70
+ repetition_penalty=1.2, # tune 1.0 (off) – 1.4
71
+ no_repeat_ngram_size=3, # 0 to disable
72
+ )
73
+
74
+ # Deterministic (greedy) — still repetition-guarded:
75
+ out = model.generate(ids, max_new_tokens=120, do_sample=False, repetition_penalty=1.3)
76
+ ```
77
+
78
  ## Benchmarks
79
 
80
  Accuracy (%) via [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness)