Text Generation
Transformers
Safetensors
English
Chinese
qwen3
from-scratch
pretraining
bilingual
piece-tokenizer
text-generation-inference
Instructions to use Ismantic/Summer-0.5B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ismantic/Summer-0.5B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ismantic/Summer-0.5B-Chat")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ismantic/Summer-0.5B-Chat") model = AutoModelForCausalLM.from_pretrained("Ismantic/Summer-0.5B-Chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ismantic/Summer-0.5B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ismantic/Summer-0.5B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ismantic/Summer-0.5B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ismantic/Summer-0.5B-Chat
- SGLang
How to use Ismantic/Summer-0.5B-Chat with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Ismantic/Summer-0.5B-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ismantic/Summer-0.5B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Ismantic/Summer-0.5B-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ismantic/Summer-0.5B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ismantic/Summer-0.5B-Chat with Docker Model Runner:
docker model run hf.co/Ismantic/Summer-0.5B-Chat
Upload Summer-0.5B-Chat
Browse files- README.md +44 -37
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -26,7 +26,7 @@ starts from `N(0, 0.02)`.
|
|
| 26 |
|
| 27 |
## Stage
|
| 28 |
|
| 29 |
-
**Chat (
|
| 30 |
`Summer-0.5B-S1`; the parallel-data anneal is a separate branch for the
|
| 31 |
translation downstream, unrelated to becoming a general chat model).
|
| 32 |
|
|
@@ -61,9 +61,13 @@ of a dedicated full-loss warm-up stage.
|
|
| 61 |
so no conversation is ever cut mid-turn. Loss is computed on assistant
|
| 62 |
turns only.
|
| 63 |
- **Learning rate**: single linear decay from 0.8x the pretraining peak LR
|
| 64 |
-
to 0, matching nanochat's `init_lr_frac=0.8`
|
| 65 |
-
|
| 66 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
**Every input must start with `<bos>`**, same as `Summer-0.5B-S0`.
|
| 69 |
|
|
@@ -75,20 +79,20 @@ competitive result.
|
|
| 75 |
|
| 76 |
### Letter multiple-choice (nanochat's primary format)
|
| 77 |
|
| 78 |
-
| | nanochat d20 |
|
| 79 |
|---|---|---|---|
|
| 80 |
-
| ARC-Easy | 0.4033 | 0.
|
| 81 |
-
| ARC-Challenge | β | 0.
|
| 82 |
-
| MMLU | 0.3232 | 0.
|
| 83 |
-
| C-Eval | β (d20 has no Chinese) | 0.
|
| 84 |
| Format-following (free_argmax_is_letter) | ~1.0 | 0.99-1.00 | 0.99-1.00 |
|
| 85 |
|
| 86 |
-
**
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
|
| 93 |
### Stop rate / long-form generation (`repetition_penalty=1.15`, not greedy)
|
| 94 |
|
|
@@ -100,12 +104,12 @@ found empirically to be the deployment sweet spot (see this project's
|
|
| 100 |
|
| 101 |
| | en natural-stop | en long-form success | zh natural-stop | zh long-form success |
|
| 102 |
|---|---|---|---|---|
|
| 103 |
-
|
|
| 104 |
-
|
|
| 105 |
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
"Long-form success" = >=150 tokens, repetition ratio <0.2, stopped naturally.
|
| 110 |
**Chinese open-ended creative writing (poems, stories) is still the weakest
|
| 111 |
spot** β it is more prone to repetition collapse than factual Q&A, a known,
|
|
@@ -113,23 +117,26 @@ unresolved limitation (root cause not fully identified; greedy decoding is
|
|
| 113 |
the primary suspect, not the training recipe, per this project's own
|
| 114 |
ablations β see `docs/POSTTRAIN.md`).
|
| 115 |
|
| 116 |
-
### The three targeted fixes, checked
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
|
|
|
| 120 |
|
| 121 |
-
| Scenario |
|
| 122 |
|---|---|---|
|
| 123 |
-
| "Who are you?" |
|
| 124 |
-
| "Translate to English: ζζ―δΈε½δΊΊ" |
|
| 125 |
-
|
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
WildChat
|
| 131 |
-
|
| 132 |
-
|
|
|
|
|
|
|
| 133 |
|
| 134 |
### What this model is / is not good at (from manual testing, not benchmarked)
|
| 135 |
|
|
@@ -141,9 +148,9 @@ country counts, or basic arithmetic ("how many days in a week"). This tracks
|
|
| 141 |
with what the letter-MC benchmark measures (does it follow instructions, pick
|
| 142 |
a reasonable-sounding answer) rather than what it does not measure (is the
|
| 143 |
answer actually correct) β the two are different questions, and this model
|
| 144 |
-
was optimized against the former. Self-identification
|
| 145 |
-
|
| 146 |
-
question is still unreliable.
|
| 147 |
|
| 148 |
## Tokenizer
|
| 149 |
|
|
|
|
| 26 |
|
| 27 |
## Stage
|
| 28 |
|
| 29 |
+
**Chat (v9e2)** β single-stage post-training from `Summer-0.5B-S0` (not from
|
| 30 |
`Summer-0.5B-S1`; the parallel-data anneal is a separate branch for the
|
| 31 |
translation downstream, unrelated to becoming a general chat model).
|
| 32 |
|
|
|
|
| 61 |
so no conversation is ever cut mid-turn. Loss is computed on assistant
|
| 62 |
turns only.
|
| 63 |
- **Learning rate**: single linear decay from 0.8x the pretraining peak LR
|
| 64 |
+
to 0, matching nanochat's `init_lr_frac=0.8`, spread across the **full**
|
| 65 |
+
training run below (not decayed-then-restarted).
|
| 66 |
+
- **9,536 steps = 2 epochs over the same `chat_v9` data** (v9 itself was
|
| 67 |
+
1 epoch, 4,768 steps). At 524M params / 625M post-training tokens
|
| 68 |
+
(~1.2 tokens/param), there was headroom to see the data twice without
|
| 69 |
+
the val loss plateauing β it kept dropping past where the 1-epoch run
|
| 70 |
+
ended (1.2459 β 1.1932 final).
|
| 71 |
|
| 72 |
**Every input must start with `<bos>`**, same as `Summer-0.5B-S0`.
|
| 73 |
|
|
|
|
| 79 |
|
| 80 |
### Letter multiple-choice (nanochat's primary format)
|
| 81 |
|
| 82 |
+
| | nanochat d20 | v9 (1 epoch) | v9e2 (this release, 2 epochs) |
|
| 83 |
|---|---|---|---|
|
| 84 |
+
| ARC-Easy | 0.4033 | 0.4440 | **0.4882** |
|
| 85 |
+
| ARC-Challenge | β | 0.3584 | **0.3848** |
|
| 86 |
+
| MMLU | 0.3232 | 0.3296 | **0.3455** |
|
| 87 |
+
| C-Eval | β (d20 has no Chinese) | 0.3646 | **0.4043** |
|
| 88 |
| Format-following (free_argmax_is_letter) | ~1.0 | 0.99-1.00 | 0.99-1.00 |
|
| 89 |
|
| 90 |
+
**A second epoch over the identical data raised every letter-MC number by
|
| 91 |
+
0.016-0.044** β a bigger jump than the v8βv9 data changes produced, and well
|
| 92 |
+
outside sampling noise (e.g. MMLU's 14,042-item standard error is ~0.004;
|
| 93 |
+
the observed gap is 4x that). Makes sense: repeated exposure reinforces the
|
| 94 |
+
"pick a letter correctly" multiple-choice skill more directly than adding new
|
| 95 |
+
data varieties does. Still beats d20 on every comparable metric.
|
| 96 |
|
| 97 |
### Stop rate / long-form generation (`repetition_penalty=1.15`, not greedy)
|
| 98 |
|
|
|
|
| 104 |
|
| 105 |
| | en natural-stop | en long-form success | zh natural-stop | zh long-form success |
|
| 106 |
|---|---|---|---|---|
|
| 107 |
+
| v9 (1 epoch) | 100% | 68% | 84% | 25% |
|
| 108 |
+
| v9e2 (2 epochs) | 100% | 74% | 82% | 24% |
|
| 109 |
|
| 110 |
+
English long-form success improved (68%β74%); Chinese is flat within noise
|
| 111 |
+
(n=100 per language, standard error ~4-5 points). Not a clean sweep, but no
|
| 112 |
+
regression either.
|
| 113 |
"Long-form success" = >=150 tokens, repetition ratio <0.2, stopped naturally.
|
| 114 |
**Chinese open-ended creative writing (poems, stories) is still the weakest
|
| 115 |
spot** β it is more prone to repetition collapse than factual Q&A, a known,
|
|
|
|
| 117 |
the primary suspect, not the training recipe, per this project's own
|
| 118 |
ablations β see `docs/POSTTRAIN.md`).
|
| 119 |
|
| 120 |
+
### The three targeted fixes from v9, re-checked after the second epoch
|
| 121 |
|
| 122 |
+
v9 fixed identity and translation but not one specific failure mode
|
| 123 |
+
(responding to a remark rather than a question); the second epoch re-sees
|
| 124 |
+
the *same* data, so this was re-tested rather than assumed fixed:
|
| 125 |
|
| 126 |
+
| Scenario | v9 (1 epoch) | v9e2 (2 epochs) |
|
| 127 |
|---|---|---|
|
| 128 |
+
| "Who are you?" | consistently answers "Summer-0.5B" | still consistent (now also states the parameter count unprompted) |
|
| 129 |
+
| "Translate to English: ζζ―δΈε½δΊΊ" | **"I am Chinese."** β correct | still correct |
|
| 130 |
+
| Given a bubble-sort explanation, then told "this looks like a pretty good model" (a remark, not a question) | invented an unrelated "time-series analysis model" tangent | **still fails** β this time it stayed on the bubble-sort topic but misread the remark as a request to critique/optimize the algorithm, rather than acknowledging the compliment |
|
| 131 |
+
|
| 132 |
+
**Repeating the same 8,000 rows of WildChat data a second time did not fix
|
| 133 |
+
the remaining gap β as expected.** This specific pattern (a bare compliment,
|
| 134 |
+
no request attached) is naturally rare even in real conversation logs
|
| 135 |
+
(WildChat mining found roughly 1% of candidate turns match it), so repetition
|
| 136 |
+
reinforces already-thin signal rather than creating new signal. A synthetic,
|
| 137 |
+
hand-written data source targeting this exact shape (analogous to how the
|
| 138 |
+
`Identity` task itself is hand-written, not mined) is the planned next step,
|
| 139 |
+
not included in this release.
|
| 140 |
|
| 141 |
### What this model is / is not good at (from manual testing, not benchmarked)
|
| 142 |
|
|
|
|
| 148 |
with what the letter-MC benchmark measures (does it follow instructions, pick
|
| 149 |
a reasonable-sounding answer) rather than what it does not measure (is the
|
| 150 |
answer actually correct) β the two are different questions, and this model
|
| 151 |
+
was optimized against the former. Self-identification and translation
|
| 152 |
+
requests are handled reliably; responding sensibly to a remark that isn't
|
| 153 |
+
phrased as a question is still unreliable.
|
| 154 |
|
| 155 |
## Tokenizer
|
| 156 |
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1048707384
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e694d507dca343bb68c56c3afcd480cec9a292854bdf2897d312247ace7bf433
|
| 3 |
size 1048707384
|