🌲 Sarv-Hybrid
The hybrid-reasoning member of the Sarv family, built directly on Strawberry-1 rather than a ChatBerry checkpoint, so that the model's native chain-of-thought channel remains available and controllable rather than suppressed.
Model Description
Sarv-Hybrid is trained to choose whether to reason before writing a poem, rather than always reasoning (like a pure reasoning model) or never reasoning (like sarv-non-reasoning). During training it saw a mix of examples with a populated analysis channel (reasoning about meter, imagery, qafiyeh/radif, emotional arc) followed by final (the poem), and examples with only a final channel — teaching the model to gauge, per-prompt, whether reasoning materially improves the output.
This makes Sarv-Hybrid a good default for general-purpose Persian poetry generation where you want reasoning on harder/structured requests (e.g. "write a robai following the aa*a rhyme scheme with an internal contradiction") but don't want the latency/verbosity cost of reasoning on simple ones (e.g. "write a short poem about rain").
- Base model: artindnr/strawberry-1 (
gpt_oss21B, MXFP4) - Fine-tuning method: LoRA, merged into base weights for release
- Reasoning behavior: hybrid / model-decided —
analysischannel may or may not be populated depending on prompt complexity - Specialization: Persian poem generation with optional visible reasoning
- Language: Persian (fa)
Both reasoning and non-reasoning examples were interleaved in the same training run (as opposed to sarv-hybrid-pro, which separates them into two stages — see sarv-hybrid-pro in the collection.).
Training Procedure
Single-stage SFT on Strawberry-1, with the analysis channel present in roughly half of training examples and empty/absent in the other half, so the model's own confidence/complexity signal governs reasoning-channel usage at inference time rather than an explicit system-level toggle. Adapters were merged and exported in BF16 and MXFP4.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "artindnr/sarv-hybrid"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
messages = [
{"role": "user", "content": "رباعیای بنویس که در آن یک تضاد درونی باشد"}
]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
outputs = model.generate(inputs, max_new_tokens=1024)
full = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=False)
Since the analysis channel may or may not appear, downstream code should parse Harmony channel markers defensively and only surface final to end users unless reasoning transparency is desired.
Intended Use
- General-purpose Persian poem generation where reasoning should be applied selectively
- Applications that want a single model instead of routing between a reasoning and non-reasoning checkpoint
- Research into learned reasoning-allocation behavior
Limitations
- The decision to reason is learned, not guaranteed — it may reason on simple prompts or skip reasoning on complex ones
- For deterministic reasoning-always or reasoning-never behavior, prefer
sarv-reasoningorsarv-non-reasoningrespectively - For the most complete/robust hybrid behavior, see
sarv-hybrid-pro, which underwent an additional dedicated reasoning stage
License
Apache 2.0, consistent with the base gpt_oss license chain.
Citation
If you use this model, please cite the Sarv and Strawberry-1 model cards on Hugging Face (artindnr).
- Downloads last month
- 119
