Instructions to use usr-wwelsh/digest-sft3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use usr-wwelsh/digest-sft3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="usr-wwelsh/digest-sft3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("usr-wwelsh/digest-sft3") model = AutoModelForCausalLM.from_pretrained("usr-wwelsh/digest-sft3", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use usr-wwelsh/digest-sft3 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf usr-wwelsh/digest-sft3:Q8_0 # Run inference directly in the terminal: llama cli -hf usr-wwelsh/digest-sft3:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf usr-wwelsh/digest-sft3:Q8_0 # Run inference directly in the terminal: llama cli -hf usr-wwelsh/digest-sft3:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf usr-wwelsh/digest-sft3:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf usr-wwelsh/digest-sft3:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf usr-wwelsh/digest-sft3:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf usr-wwelsh/digest-sft3:Q8_0
Use Docker
docker model run hf.co/usr-wwelsh/digest-sft3:Q8_0
- LM Studio
- Jan
- vLLM
How to use usr-wwelsh/digest-sft3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "usr-wwelsh/digest-sft3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "usr-wwelsh/digest-sft3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/usr-wwelsh/digest-sft3:Q8_0
- SGLang
How to use usr-wwelsh/digest-sft3 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 "usr-wwelsh/digest-sft3" \ --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": "usr-wwelsh/digest-sft3", "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 "usr-wwelsh/digest-sft3" \ --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": "usr-wwelsh/digest-sft3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use usr-wwelsh/digest-sft3 with Ollama:
ollama run hf.co/usr-wwelsh/digest-sft3:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use usr-wwelsh/digest-sft3 with Docker Model Runner:
docker model run hf.co/usr-wwelsh/digest-sft3:Q8_0
- Lemonade
How to use usr-wwelsh/digest-sft3 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull usr-wwelsh/digest-sft3:Q8_0
Run and chat with the model
lemonade run user.digest-sft3-Q8_0
List all available models
lemonade list
- Atomic Chat
digest-sft3
SFT pass on HuggingFaceTB/SmolLM2-135M-Instruct from
digest-finetune, trained on a diff-aware
dataset (prompts include file stats + truncated patches on sparse-commit days, matching what
production git-digest actually shows the model β the prior sft2 checkpoint was trained on
commit-message-only prompts, a mismatch with production input).
Training
6 epochs over 99 examples, final training loss 1.944, mean token accuracy 0.74. The last step is published; there is no checkpoint selection (see Replaced weights below for why).
Evaluation
Mean reward 0.6724 over all 10 held-out days, scored by
scripts/eval_reward.py,
greedy decoding, max_new_tokens=768. 1 of 10 days truncated at the cap; no day scored 0.000.
Reward ladder
Every row scored by the same reward.py, the same 10 held-out days, greedy,
max_new_tokens=768. This is the only table on this card where the numbers are
comparable to each other.
| model | reward | ||
|---|---|---|---|
| untrained base | 0.0000 |
ββββββββββββββββββββββββ |
|
digest-sft2 |
0.2100 |
ββββββββββββββββββββββββ |
|
digest-sft3 |
0.6724 |
ββββββββββββββββββββββββ |
per-model detail (truncation + zero-scoring days)
| model | mean | days | truncated at cap | scored 0.000 |
|---|---|---|---|---|
| untrained base | 0.0000 |
10 | 7/10 | 10/10 |
digest-sft2 |
0.2100 |
10 | 5/10 | 7/10 |
digest-sft3 |
0.6724 |
10 | 1/10 | 0/10 |
Raw generations for every row are published alongside these weights, one file per model:
eval/ β each log carries the
full completion and its per-component score, so every number above can be checked against the
text that produced it.
What changed between sft2 and sft3
Both the data and the scorer were rewritten. Prompts are now diff-aware β they
carry file stats and truncated patches, matching what production git-digest actually
sends β where digest-sft2 only ever saw commit messages. reward.py was then
hardened by adversarial fuzzing and teacher calibration, closing four scoring holes
(fabricated summaries, orphan prose, binary coverage credit, and omission costing less
than a weak section) and adding penalties for truncation, self-repetition and summary
echo.
Earlier published totals for these checkpoints (base 0.3040, sft2 0.4990)
came from evaluate.py at max_new=400 with repetition_penalty=1.08, under the
pre-hardening formula. They differ from the table above in three ways at once β scorer,
token cap, and repetition penalty β so no single delta can be attributed to the reward
rewrite, and they are not restated here as a comparison. The ladder above replaces them
outright: it is the only measurement where all three checkpoints share settings.
What the rescoring does show is that the untrained base earns 0.0000 under the
current scorer, on all 10 days. It emits **Summary** instead of ## Summary, invents
sections outside the schema, fabricates its content, and loops the same two paragraphs
until it hits the token cap. Any nonzero credit for that was the old formula's error.
Decoding
The ladder above is greedy. Sampled at temperature=0.8, top_p=0.95, digest-sft3
scores 0.904 with 0% truncation β but on 3 days Γ 8 rollouts, not the
full 10, so it is kept out of the table rather than compared against numbers measured
differently. Under sampling, coverage and grounding are maxed (1.000 across all 24
rollouts) and the only remaining cost is a summary-echo penalty on ~29% of generations.
The looping failure described in earlier versions of this card is a greedy-decoding
artifact, not a policy defect: the day that loops to the token cap under greedy
scores 8/8 perfect when sampled. Prefer temperature=0.8 in production.
Scope
- The ladder is 10 held-out days per model. That is a small eval set; treat differences of a few hundredths as noise, and the base-vs-trained gap as real.
- The untrained base scores
0.0000on a task it was never trained for, given diff-aware prompts it has never seen, against a rubric written for this digest schema. It is the right number for "which of these should I use" and the wrong number for "how good is SmolLM2". - The temp-0.8 result is 3 days Γ 8 rollouts, not 10 days. It is the weakest-evidence number on this card.
Replaced weights
An earlier upload under this name claimed mean reward 1.0000. That number was wrong twice over and those weights have been replaced:
- It came from
argmaxreward over 52 checkpoints scored on the same 10-row eval set. With n=10 and 52 noisy candidates the winner is selected for luck on that exact set. - The reward function it maximised did not penalise truncation or self-repetition, so a
completion that looped one fragment to the token cap scored a clean 1.0. Fixed in
e1e71f2(truncation, trigram-repetition and summary-echo penalties); the same run rescores to 0.6724.
The 52 checkpoint-* folders have been removed β they were the artifacts of that selection
procedure. They remain in this repo's git history.
License
Weights: Apache-2.0 (inherited from the base model). Training code: MIT β usr-wwelsh/digest-finetune.
- Downloads last month
- 876