Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
The chat version of
cagliostro-v3.5
, a 146M parameter language model. It is v3.5 after one epoch of supervised fine-tuning on
smol-smoltalk
, the conversation set SmolLM2-135M-Instruct and SmolLM2-360M-Instruct were tuned on. The architecture and tokenizer are unchanged. Only the weights are different.
The base model already saw SmolTalk conversations during pretraining, written as plain
User:
and
Assistant:
lines. This fine-tune keeps that format and teaches the model to end its turn. Every assistant reply ends with
<|endoftext|>
, so generation stops on its own instead of running on into the user's next message. Loss is computed on the assistant replies only.
Same 12 prompts for both models, greedy decoding, at most 200 new tokens:
cagliostro-v3.5
cagliostro-v3.5-chat
Ends its reply by itself
6 / 12
8 / 12
Writes the user's next turn for them
4 / 12
0 / 12
Follows a system prompt (answer like a pirate)
no
yes
Uses the earlier turn in a two-turn chat
no
yes
The four chat replies that did not stop were long answers cut off by the 200 token limit. Every output from both models is in
samples.json
.
Loss on held-out assistant tokens (2,000 conversations from the smol-smoltalk test split):
Step
0
500
1,000
2,000
3,000
4,225
Validation loss
1.161
1.066
1.042
1.014
0.997
0.988
How it compares with SmolLM2-135M
The Open SLM Leaderboard reports five benchmarks, so we also ran a wider set against SmolLM2-135M, the model cagliostro-v3.5 replaced at the top of that board, and against SmolLM2-135M-Instruct. Both sides got the same harness and the same settings. Every difference comes with a 95% interval from a paired bootstrap over the benchmark's items. All raw outputs are in
evals/
.
Base models
cagliostro-v3.5 against SmolLM2-135M: lm-evaluation-harness 0.4.13, zero-shot, float32, full test sets, 2,048-token context for both. The first four rows reproduce the leaderboard's own numbers exactly, which checks the setup.
Benchmark
Metric
cagliostro-v3.5
SmolLM2-135M
Difference [95% CI]
HellaSwag
acc_norm
43.41
43.11
+0.30 [-0.34, +1.01]
ARC-Easy
acc_norm
53.75
58.59
-4.84
[-6.48, -3.03]
ARC-Challenge
acc_norm
29.35
29.61
-0.26 [-2.30, +1.79]
PIQA
acc_norm
68.06
68.50
-0.44 [-2.07, +1.20]
LAMBADA (OpenAI)
acc
38.70
42.89
-4.19
[-5.39, -2.97]
LAMBADA (OpenAI)
perplexity, lower is better
27.25
19.26
WikiText-2
bits per byte, lower is better
0.910
0.847
WikiText-2
word perplexity, lower is better
29.13
23.13
BLiMP (67 sets)
acc
77.26
78.97
-1.71
[-2.02, -1.36]
BoolQ
acc
61.25
60.31
+0.95 [-0.25, +2.11]
Social IQa
acc
40.23
39.36
+0.87 [-0.92, +2.66]
WinoGrande
acc
52.41
52.96
-0.55 [-3.87, +2.61]
OpenBookQA
acc_norm
32.20
33.40
-1.20 [-3.80, +1.60]
SciQ
acc_norm
75.10
78.20
-3.10
[-5.50, -0.90]
CommonsenseQA
acc
19.33
19.49
-0.16 [-3.11, +2.95]
MMLU (57 subjects)
acc
24.57
24.35
+0.22 [-0.78, +1.22]
ArithMark-3
official script
45.30
38.80
+6.50
ArithMark-2 (not on the board)
official script
59.84
33.20
+26.64
[+24.32, +28.92]
Open SLM Index
27.49
27.01
+0.48 [-0.82, +1.75]
Bold marks an interval that excludes zero. The ArithMark rows and the Index come from the leaderboard's own ArithMark script (float32) and Index formula, as measured for the
cagliostro-v3.5 card
. ArithMark-2 is AxiomicLabs' separate arithmetic set, scored with the same script.
Outside the leaderboard, SmolLM2-135M is the stronger general language model. It is clearly ahead on plain language modelling (WikiText, LAMBADA), grammar (BLiMP), science questions (SciQ) and ARC-Easy. The two are statistically level on HellaSwag, ARC-Challenge, PIQA, BoolQ, Social IQa, WinoGrande, OpenBookQA, CommonsenseQA and MMLU; the last two are at chance for both models. cagliostro-v3.5's lead on the board comes from arithmetic, which the Index weights at 0.65: 6.5 points on ArithMark-3, and 26.6 on ArithMark-2, a separate arithmetic set the board does not use. SmolLM2-135M was trained on 2 trillion tokens, cagliostro-v3.5 on 75.4 billion.
Chat models
cagliostro-v3.5-chat against SmolLM2-135M-Instruct. According to its model card, SmolLM2-135M-Instruct was fine-tuned on the same smol-smoltalk data and then trained with DPO on UltraFeedback. This model had one epoch of supervised fine-tuning and nothing else.
MT-Bench, pairwise.
All 80 questions, both turns.
Each model answered with its own chat template, greedy decoding, repetition penalty 1.1, up to 512 new tokens.
The judge was gpt-oss-120b (the heretic-v2 MXFP4 GGUF, run with llama.cpp), at temperature 0 and medium reasoning.
Every pair was judged twice, with the answers in both orders. Reference answers were shown for math, reasoning and coding.
A model takes a question-turn when it wins on balance across the two orders. A split counts as a tie.
cagliostro-v3.5-chat
SmolLM2-135M-Instruct
Tie
All question-turns (160)
66
55
39
Turn 1
35
27
18
Turn 2
31
28
21
Math
13
3
4
Writing
11
5
4
Roleplay
9
7
4
Coding
8
4
8
STEM
8
6
6
Reasoning
7
7
6
Humanities
6
11
3
Extraction
4
12
4
Single judge verdicts (320)
169
148
3
cagliostro-v3.5-chat
SmolLM2-135M-Instruct
Mean answer length, tokens
322
304
Answers that end on their own within 512 tokens
87%
82%
Over the 121 question-turns with a winner, a two-sided sign test gives p = 0.36, so the two are statistically level. cagliostro-v3.5-chat is better at math and writing, and SmolLM2-135M-Instruct at extraction and humanities.
Files in
evals/
base/summary.json
: every lm-evaluation-harness score above, with the paired intervals.
mtbench/answers_cagliostro-v3.5-chat.jsonl
and
mtbench/answers_smollm2-135m-instruct.jsonl
: both models' answers to all 80 questions, both turns.
mtbench/judgments.jsonl
: all 320 judge verdicts, with the judge's written reasons.
mtbench/summary.json
: the tallies in the tables above.
code/
: the scripts.
run_base.sh
runs the base benchmarks.
gen_mtbench.py
,
judge.py
,
analyze.py
and
report.py
run MT-Bench and the analysis.
chat.py
plus the model files make up the KV-cached decoder used for this model's answers. On the 11 questions generated both ways, it gave the same answers as
transformers
generate
.
Chat format
<|endoftext|>System: {optional system prompt}
User: {message}
Assistant: {reply}<|endoftext|>User: {message}
Assistant:
The tokenizer's chat template produces exactly this, so
apply_chat_template
is all you need.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "bench-labs/cagliostro-v3.5-chat"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, dtype=torch.float32)
messages = [{"role": "user", "content": "Write a Python function that reverses a string."}]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
ids = tok(text, return_tensors="pt", add_special_tokens=False)
out = model.generate(**ids, max_new_tokens=200, do_sample=False, repetition_penalty=1.1)
print(tok.decode(out[0, ids["input_ids"].shape[1]:], skip_special_tokens=True))
trust_remote_code=True
is required because
CagliostroForCausalLM
is not part of transformers. Pass it to the tokenizer too, or transformers stops to ask before loading. Low temperature works best. The samples below use greedy decoding or temperature 0.3 with a repetition penalty of 1.1.
Fast inference
generate()
now uses a KV cache, so it is fast out of the box. On a GPU,
generate_fast()
goes further with a static cache and CUDA graphs:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
model_id = "bench-labs/cagliostro-v3.5-chat"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, dtype=torch.float16).to("cuda")
messages = [{"role": "user", "content": "Explain photosynthesis to a ten year old."}]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
ids = tok(text, return_tensors="pt", add_special_tokens=False).input_ids.to("cuda")
model.generate_fast(ids, max_new_tokens=300, repetition_penalty=1.1, eos_token_id=tok.eos_token_id,
streamer=TextStreamer(tok, skip_prompt=True, skip_special_tokens=True))
Precision
GPU
CPU
Previous release,
generate()
without a cache
fp32
31 tok/s (1.0x)
8 tok/s (1.0x)
generate()
, now with a KV cache
fp32
43 tok/s (1.4x)
22 tok/s (2.7x)
generate_fast()
fp32
88 tok/s (2.8x)
23 tok/s (2.8x)
generate_fast()
fp16
150 tok/s (4.8x)
generate_fast(compile=True)
fp16
230 tok/s (7.4x)
Measured with the code in this repository. GPU numbers use 256 new tokens; CPU numbers use 128. Both use a 23-token prompt and repetition penalty 1.1, median of three runs. On a GPU,
generate_fast()
uses CUDA graphs; on a CPU it falls back to a static-cache loop.
The forward pass used for benchmark scoring is unchanged bit for bit, so leaderboard numbers do not move.
In float32,
generate()
and
generate_fast()
give exactly the same greedy text as the previous release on all 12 sample prompts.
float16 and bfloat16 are about 1.7x faster than float32. Greedy text can drift from float32 at a near tie, usually after a few dozen tokens (float16: 8 of 12 prompts identical over 200 tokens). float16 tracked float32 slightly better than bfloat16.
compile=True
fuses the decode step with
torch.compile
for about another 1.5x. It needs a working Triton install and costs about 40 seconds the first time in each process.
generate_fast()
takes one sequence at a time and supports
temperature
,
top_p
,
seed
,
repetition_penalty
and a
transformers
TextStreamer
. Use
generate()
for batches.
Sample outputs
Greedy decoding. Picked to show both what works and what does not.
User:
If I have 3 apples and buy 5 more, then eat 2, how many do I have?
To solve this problem, let's break it down step by step. We start with the initial number of apples, which is 3. Then we add 5 more, so now we have 3 + 5 = 8 apples. Finally, we eat 2, leaving us with 8 - 2 = 6 apples.
So, after eating 2 apples, you would have 6 apples left.
User:
Write a Python function that reverses a string.
Here's a simple Python function to reverse a string:
defreverse_string(s):
return s[::-1]
This function uses Python's slice notation
s[start:stop:step]
to create a reversed copy of the string. The
::-1
slice means "start at the beginning of the string and end at the end, move with the step you want".
System:
You are a pirate. Always answer like a pirate.
User:
What's the weather like today?
Ahoy there, matey! I'm a pirate, but I can tell you about the weather too. Today's a bit of a sweltering day, with temperatures soaring above 100 degrees Fahrenheit. The sky is a sickly shade of yellow, and the wind's howling like a pack of wolves. [...] Now, would you like to join me on a treasure hunt or perhaps a game of cards?
User:
Can you recommend a good name for a pet cat?
Assistant:
Sure! How about Luna? It's short, sweet and suits a curious cat.
User:
Nice. Can you give me two more options?
Absolutely! Another great choice is Whiskers. It's playful and adorable, perfect for a cat who loves to run around. And if you're looking for something a bit more serious, you might consider Pawsome. It's a gentle and affectionate name that fits well with the idea of a cat who loves to be close to humans.
User:
Translate 'good morning' into Spanish.
"Good morning" in Spanish is "Hola."
Wrong. It should be "Buenos días".
User:
Explain photosynthesis to a ten year old.
Photosynthesis is like a magic party in your body where plants and animals make their own food using sunlight, water, and carbon dioxide. [...]
The tone is right, the biology is not.
Training details
Field
Value
Base model
bench-labs/cagliostro-v3.5
Data
smol-smoltalk train split: 456,510 conversations, 378M tokens, 306M of them assistant tokens
Epochs
1
Loss
Assistant tokens and the closing `<
Packing
Whole conversations packed into 2,048 token sequences, none split across sequences
Conversations longer than 2,049 tokens were truncated (5,675 of them). 3,831 were dropped because truncation left no assistant reply.
Limitations
At 146M parameters this model is fluent but unreliable. It gets simple facts wrong, invents details with confidence, and has no fixed identity: asked who it is, it may say it is a writing assistant or a data scientist at a made-up company. It often ignores format constraints (its "haiku" runs to five stanzas) and can give wrong practical instructions. English only, 2,048 token context, no preference tuning and no safety tuning. Do not rely on it for facts or advice.
It has not been scored on the Open SLM Leaderboard tasks. Those score raw text completion without a chat template, so cagliostro-v3.5 remains the model to use for benchmarks.
License
Apache-2.0, the same as cagliostro-v3.5. smol-smoltalk is also Apache-2.0.
Runs of bench-labs cagliostro-v3.5-chat on huggingface.co
668
Total runs
39
24-hour runs
67
3-day runs
244
7-day runs
639
30-day runs
More Information About cagliostro-v3.5-chat huggingface.co Model
cagliostro-v3.5-chat huggingface.co is an AI model on huggingface.co that provides cagliostro-v3.5-chat's model effect (), which can be used instantly with this bench-labs cagliostro-v3.5-chat model. huggingface.co supports a free trial of the cagliostro-v3.5-chat model, and also provides paid use of the cagliostro-v3.5-chat. Support call cagliostro-v3.5-chat model through api, including Node.js, Python, http.
cagliostro-v3.5-chat huggingface.co is an online trial and call api platform, which integrates cagliostro-v3.5-chat's modeling effects, including api services, and provides a free online trial of cagliostro-v3.5-chat, you can try cagliostro-v3.5-chat online for free by clicking the link below.
bench-labs cagliostro-v3.5-chat online free url in huggingface.co:
cagliostro-v3.5-chat is an open source model from GitHub that offers a free installation service, and any user can find cagliostro-v3.5-chat on GitHub to install. At the same time, huggingface.co provides the effect of cagliostro-v3.5-chat install, users can directly use cagliostro-v3.5-chat installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
cagliostro-v3.5-chat install url in huggingface.co: