Text Generation
Transformers
Safetensors
English
llama
wisp
tiny
instruct
sft
conversational
text-generation-inference
Instructions to use DedeProGames/Wisp-15M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DedeProGames/Wisp-15M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DedeProGames/Wisp-15M-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DedeProGames/Wisp-15M-Instruct") model = AutoModelForCausalLM.from_pretrained("DedeProGames/Wisp-15M-Instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DedeProGames/Wisp-15M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DedeProGames/Wisp-15M-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DedeProGames/Wisp-15M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DedeProGames/Wisp-15M-Instruct
- SGLang
How to use DedeProGames/Wisp-15M-Instruct 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 "DedeProGames/Wisp-15M-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DedeProGames/Wisp-15M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "DedeProGames/Wisp-15M-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DedeProGames/Wisp-15M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DedeProGames/Wisp-15M-Instruct with Docker Model Runner:
docker model run hf.co/DedeProGames/Wisp-15M-Instruct
Card wording: GPQA sampling temperature; LiveBench rounding
Browse files
README.md
CHANGED
|
@@ -4,7 +4,7 @@ language:
|
|
| 4 |
- en
|
| 5 |
library_name: transformers
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
-
base_model: DedeProGames/Wisp-
|
| 8 |
datasets:
|
| 9 |
- HuggingFaceTB/smol-smoltalk
|
| 10 |
tags:
|
|
@@ -16,21 +16,21 @@ tags:
|
|
| 16 |
- llama
|
| 17 |
---
|
| 18 |
|
| 19 |
-
# Wisp-
|
| 20 |
|
| 21 |
-
An instruction-tuned version of [Wisp-
|
| 22 |
|
| 23 |
-
At
|
| 24 |
|
| 25 |
## Quickstart
|
| 26 |
|
| 27 |
-
Use the recommended sampling settings (stored in `generation_config.json`). With near-greedy decoding this model
|
| 28 |
|
| 29 |
```python
|
| 30 |
import torch
|
| 31 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 32 |
|
| 33 |
-
repo = "DedeProGames/Wisp-
|
| 34 |
tokenizer = AutoTokenizer.from_pretrained(repo)
|
| 35 |
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype=torch.float32).eval()
|
| 36 |
|
|
@@ -57,41 +57,41 @@ The Wisp tokenizer already has `<|im_start|>` and `<|im_end|>`, so the model use
|
|
| 57 |
|
| 58 |
## Architecture
|
| 59 |
|
| 60 |
-
Same as Wisp-
|
| 61 |
|
| 62 |
## Training
|
| 63 |
|
| 64 |
| | |
|
| 65 |
|---|---|
|
| 66 |
-
| Base | DedeProGames/Wisp-
|
| 67 |
-
| Data | smol-smoltalk train split, conversations of up to 1,024 tokens (
|
| 68 |
| Epochs | 2 (14,502 steps, batch 32 = 16 × 2 gradient accumulation) |
|
| 69 |
| Optimizer | AdamW (β = 0.9, 0.95), weight decay 0.1 on 2D matrices, grad clip 1.0 |
|
| 70 |
| Schedule | lr 2e-4, 300 warmup steps, cosine to 2e-5 |
|
| 71 |
| Loss | assistant tokens; `<|im_end|>` weighted 5× |
|
| 72 |
| Precision | bf16 autocast, fp32 master weights |
|
| 73 |
-
| Hardware | 1× NVIDIA RTX 3060 12 GB,
|
| 74 |
|
| 75 |
-
Held-out loss on assistant tokens (smol-smoltalk test split): 1.
|
| 76 |
|
| 77 |
## Evaluation
|
| 78 |
|
| 79 |
-
Benchmarks follow the protocol of the [Kiyo-230M-Instruct](https://huggingface.co/DedeProGames/Kiyo-230M-Instruct) card: FP16, the model's own chat template, no system prompt, new-token limits IFEval 1,024, GPQA 384, LiveBench 512, and the model's full 2,048-token context. The main setting uses temperature 0.1, top-k 50 and repetition penalty 1.05, as on the card. The second setting is the recommended one shipped in `generation_config.json`.
|
| 80 |
|
| 81 |
-
| Benchmark | Metric | Wisp-
|
| 82 |
|---|---|---:|---:|
|
| 83 |
-
| GPQA Diamond | pass@1 (198 × 5 samples, T = 0.6) |
|
| 84 |
-
| IFEval | prompt-level strict |
|
| 85 |
-
| LiveBench instruction following | strict, 200 questions |
|
| 86 |
| CaseReportBench | token F1 | not run (not on the Hub) | not run |
|
| 87 |
-
| EOS rate (IFEval) | share of answers that stop | 0.
|
| 88 |
|
| 89 |
-
For reference, the Kiyo card reports (not re-run here):
|
| 90 |
|
| 91 |
Notes:
|
| 92 |
|
| 93 |
-
- With the protocol setting, about
|
| 94 |
-
- GPQA: among answered questions, accuracy is
|
| 95 |
- The GPQA prompt was written for this run, not taken from the Kiyo card, so the number is not strictly comparable.
|
| 96 |
- Single run, single seed. Differences of a point or two are within noise.
|
| 97 |
|
|
@@ -99,7 +99,7 @@ Per-sample outputs and summaries are in [`eval/`](eval/).
|
|
| 99 |
|
| 100 |
## Limitations
|
| 101 |
|
| 102 |
-
- It is
|
| 103 |
- Under near-greedy decoding it can loop. Keep the recommended sampling settings.
|
| 104 |
- Context is 2,048 tokens, but it was fine-tuned on conversations of up to 1,024 tokens.
|
| 105 |
- English only.
|
|
|
|
| 4 |
- en
|
| 5 |
library_name: transformers
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
+
base_model: DedeProGames/Wisp-5M
|
| 8 |
datasets:
|
| 9 |
- HuggingFaceTB/smol-smoltalk
|
| 10 |
tags:
|
|
|
|
| 16 |
- llama
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# Wisp-5M-Instruct
|
| 20 |
|
| 21 |
+
An instruction-tuned version of [Wisp-5M](https://huggingface.co/DedeProGames/Wisp-5M), a 5.1M-parameter LLaMA-style model pretrained from scratch. It was fully fine-tuned for two epochs on [smol-smoltalk](https://huggingface.co/datasets/HuggingFaceTB/smol-smoltalk) with the loss computed only on assistant tokens (end-of-turn tokens weighted 5×, so the model learns to stop).
|
| 22 |
|
| 23 |
+
At 5M parameters this is a tiny research model. It follows the chat format and answers simple requests, but factual knowledge, reasoning and arithmetic are very weak. See the limitations below.
|
| 24 |
|
| 25 |
## Quickstart
|
| 26 |
|
| 27 |
+
Use the recommended sampling settings (they are stored in `generation_config.json`). With near-greedy decoding this model often falls into repetition loops.
|
| 28 |
|
| 29 |
```python
|
| 30 |
import torch
|
| 31 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 32 |
|
| 33 |
+
repo = "DedeProGames/Wisp-5M-Instruct"
|
| 34 |
tokenizer = AutoTokenizer.from_pretrained(repo)
|
| 35 |
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype=torch.float32).eval()
|
| 36 |
|
|
|
|
| 57 |
|
| 58 |
## Architecture
|
| 59 |
|
| 60 |
+
Same as Wisp-5M: `LlamaForCausalLM`, 9 layers, hidden size 192, 6 heads with 2 KV heads, SwiGLU (intermediate 512), RMSNorm, RoPE (θ = 10,000), tied embeddings, 8,192-token byte-level BPE vocabulary, 2,048-token context. Weights in BF16 (`model.safetensors`, 20 MB).
|
| 61 |
|
| 62 |
## Training
|
| 63 |
|
| 64 |
| | |
|
| 65 |
|---|---|
|
| 66 |
+
| Base | DedeProGames/Wisp-5M |
|
| 67 |
+
| Data | smol-smoltalk train split, conversations of up to 1,024 tokens (with this tokenizer) |
|
| 68 |
| Epochs | 2 (14,502 steps, batch 32 = 16 × 2 gradient accumulation) |
|
| 69 |
| Optimizer | AdamW (β = 0.9, 0.95), weight decay 0.1 on 2D matrices, grad clip 1.0 |
|
| 70 |
| Schedule | lr 2e-4, 300 warmup steps, cosine to 2e-5 |
|
| 71 |
| Loss | assistant tokens; `<|im_end|>` weighted 5× |
|
| 72 |
| Precision | bf16 autocast, fp32 master weights |
|
| 73 |
+
| Hardware | 1× NVIDIA RTX 3060 12 GB, 47 minutes |
|
| 74 |
|
| 75 |
+
Held-out loss on assistant tokens (smol-smoltalk test split): 1.791 at the end of training.
|
| 76 |
|
| 77 |
## Evaluation
|
| 78 |
|
| 79 |
+
Benchmarks follow the protocol of the [Kiyo-230M-Instruct](https://huggingface.co/DedeProGames/Kiyo-230M-Instruct) card: FP16, the model's own chat template, no system prompt, new-token limits IFEval 1,024, GPQA 384, LiveBench 512, and the model's full 2,048-token context. The main setting uses temperature 0.1, top-k 50 and repetition penalty 1.05, as on the card (GPQA is sampled at T = 0.6, as on the card). The second setting is the recommended one shipped in `generation_config.json`.
|
| 80 |
|
| 81 |
+
| Benchmark | Metric | Wisp-5M-Instruct, protocol | Wisp-5M-Instruct, recommended sampling |
|
| 82 |
|---|---|---:|---:|
|
| 83 |
+
| GPQA Diamond | pass@1 (198 × 5 samples, T = 0.6) | 9.80 | not run |
|
| 84 |
+
| IFEval | prompt-level strict | 12.38 | 11.65 |
|
| 85 |
+
| LiveBench instruction following | strict, 200 questions | 16.53 | not run |
|
| 86 |
| CaseReportBench | token F1 | not run (not on the Hub) | not run |
|
| 87 |
+
| EOS rate (IFEval) | share of answers that stop | 0.82 | 0.98 |
|
| 88 |
|
| 89 |
+
For reference, the Kiyo card reports (not re-run here): Supra2-100M-Instruct GPQA 5.56, IFEval 9.06, LiveBench 11.28; SmolLM2-135M-Instruct GPQA 16.57, IFEval 20.89, LiveBench 24.23.
|
| 90 |
|
| 91 |
Notes:
|
| 92 |
|
| 93 |
+
- With the protocol setting, about 18% of IFEval answers never stop and loop on a sentence. Under the recommended sampling this drops to about 2%.
|
| 94 |
+
- GPQA: among answered questions, accuracy is 19.5%, which is below the 25% chance level. The model cannot solve these questions.
|
| 95 |
- The GPQA prompt was written for this run, not taken from the Kiyo card, so the number is not strictly comparable.
|
| 96 |
- Single run, single seed. Differences of a point or two are within noise.
|
| 97 |
|
|
|
|
| 99 |
|
| 100 |
## Limitations
|
| 101 |
|
| 102 |
+
- It is tiny (5.1M parameters). Expect factual errors, invented details, arithmetic mistakes, weak multi-step reasoning, and repetitive text in long answers.
|
| 103 |
- Under near-greedy decoding it can loop. Keep the recommended sampling settings.
|
| 104 |
- Context is 2,048 tokens, but it was fine-tuned on conversations of up to 1,024 tokens.
|
| 105 |
- English only.
|