Loading…
Loading…
A 2B-class ternary language model for Chinese and Japanese chat, continued from Ternary Bonsai 2 2B by Prism ML. It runs in llama.cpp (PrismML fork) from a single file of 0.43–0.55 GB.
Exp marks this as an experimental release. Later versions will carry a date suffix.
In a blind pairwise evaluation on 200 Chinese and Japanese chat prompts, an LLM judge preferred Rina Juvenile Exp over the original Bonsai 2 2B: win rate 0.618 (Chinese 0.605, Japanese 0.630; both significant). The trade-off is weaker English instruction following and tool calling than Bonsai 2. See Evaluation and Limitations.
Rina Juvenile Exp 是 Rinstitute 在 Prism ML 的 Ternary Bonsai 2 2B 上继续训练得到的三值({−1, 0, +1})小模型,侧重中文和日文对话。GGUF 有三种打包(0.43–0.55 GB,权重相同),用 PrismML 的 llama.cpp 分支运行。
在 200 道中日文对话题的盲评中(裁判 Gemini 4 Argon),它对原版 Bonsai 2 的胜率是 0.618:中文 0.605,日文 0.630,两项都显著。代价是英文指令遵循和工具调用比 Bonsai 2 弱:IFEval 81.1 对 87.8,BFCL v3 49.9 对 60.6。
这是实验版,中日文回答的绝对质量仍然有限,会出现语法错误、混入其他语言、编造事实等问题。只支持文本输入。
Rina Juvenile Exp は、Rinstitute が Prism ML の Ternary Bonsai 2 2B を追加学習した三値({−1, 0, +1})の小型モデルで、中国語と日本語の対話に重点を置いています。GGUF は 3 種類のパッキング(0.43〜0.55 GB、重みは同一)で提供し、PrismML 版の llama.cpp で動作します。
中国語・日本語の対話 200 問によるブラインド評価(審査モデル:Gemini 4 Argon)では、元の Bonsai 2 に対する勝率は 0.618 でした。内訳は中国語 0.605、日本語 0.630 で、どちらも統計的に有意です。一方、英語の指示追従とツール呼び出しは Bonsai 2 より弱くなっています(IFEval 81.1 対 87.8、BFCL v3 49.9 対 60.6)。
実験版のため、回答には文法の誤り、他言語の混入、事実の捏造などがまだ見られます。入力はテキストのみに対応しています。
| Item | Specification |
|---|---|
| Developer | Rinstitute |
| Base model | Ternary Bonsai 2 2B (Prism ML), itself derived from Qwen3.5-2B |
| Parameters | ~1.88B (24 blocks, hidden 2048, tied embedding and LM head); architecture unchanged from Bonsai 2 |
| Architecture | Hybrid attention (18 linear-attention and 6 full-attention layers), SwiGLU MLP, RoPE, RMSNorm |
| Weight format | Ternary {−1, 0, +1} with FP16 group-wise scales (one per 128 weights), packed as PQ2_0, PTQ1_0 or Q2_0, in Bonsai's Hadamard-rotated basis. 6.3% of the ternary values differ from Bonsai 2 |
| Languages | Chinese and Japanese (focus), English |
| Input | Text only. Bonsai 2's vision projector (mmproj) is not supported with these weights |
| Context | The architecture inherits 262K tokens, but our training used sequences of at most 16K tokens. Longer contexts are untested |
| Thinking | On by default (<think> … </think>); can be turned off per request |
| License | Apache 2.0 |
| File | Packing | Size | Bits/weight |
|---|---|---|---|
Rina-Juvenile-Exp-2B-PQ2_0.gguf |
2-bit slots, 128 weights per scale | 517 MB | ~2.20 |
Rina-Juvenile-Exp-2B-PTQ1_0.gguf |
dense trits, 128 weights per scale | 429 MB | ~1.83 |
Rina-Juvenile-Exp-2B-Q2_0.gguf |
2-bit slots, 64 weights per scale | 547 MB | ~2.33 |
| File | SHA-256 |
|---|---|
Rina-Juvenile-Exp-2B-PQ2_0.gguf |
7a14a52009bf80e30a787a941652d5922c2ef03f1607d2f43c4fbca35b650ac1 |
Rina-Juvenile-Exp-2B-PTQ1_0.gguf |
a32013e9def0941ffed893a90eba42a89d946237a2c2e17ac986583e01d55476 |
Rina-Juvenile-Exp-2B-Q2_0.gguf |
8f647d62ba39389cd7a7468b4cba7b52b28e0e5e71bb157ce974898c3dd8a771 |
On CUDA all three files give bit-identical outputs (see GGUF numerical check), so the choice there only affects size and speed.
| Packing | GPU prompt (pp512), tok/s | GPU generation (tg128), tok/s | CPU, 2,044 tokens of text |
|---|---|---|---|
| PQ2_0 | 26,300 ± 2,100 | 624 ± 7 | 13 s |
| PTQ1_0 | 27,700 ± 1,700 | 702 ± 5 | 79 s |
| Q2_0 | 26,800 ± 1,700 | 621 ± 3 | 277 s |
GPU: NVIDIA RTX 5090 D, llama-bench -ngl 99 -p 512 -n 128 -r 10; the prompt-speed differences are within noise. CPU: AMD Ryzen 9 9950X under WSL2, one timed run per file over the same four 512-token chunks.
Use the PrismML-Eng/llama.cpp fork (branch prism). It runs all three files. Upstream llama.cpp does not recognize the PQ2_0 and PTQ1_0 types. We tested with fork commit 73bfe6c (2026-10-19). The commands below use PQ2_0; the other files work the same way. For prebuilt binaries and per-backend setup, see Prism ML's Bonsai-demo.
git clone -b prism https://github.com/PrismML-Eng/llama.cpp && cd llama.cpp
cmake -B build -DGGML_CUDA=ON && cmake --build build -j # drop -DGGML_CUDA=ON on macOS
Download a file (needs pip install -U huggingface_hub):
hf download Rinstitute/Rina-Juvenile-Exp-2B-GGUF Rina-Juvenile-Exp-2B-PQ2_0.gguf --local-dir .
./build/bin/llama-cli -m Rina-Juvenile-Exp-2B-PQ2_0.gguf -ngl 99 \
--temp 1.0 --top-p 0.95 --top-k 20 --presence-penalty 1.0
Thinking is on by default. For short, direct answers, turn it off and use the non-thinking sampling settings:
./build/bin/llama-cli -m Rina-Juvenile-Exp-2B-PQ2_0.gguf -ngl 99 -rea off \
--temp 0.7 --top-p 0.8 --top-k 20 --presence-penalty 1.5
./build/bin/llama-server -m Rina-Juvenile-Exp-2B-PQ2_0.gguf -ngl 99 --jinja -c 32768 --port 8080 \
--temp 1.0 --top-p 0.95 --top-k 20 --presence-penalty 1.0
curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
"messages": [{"role": "user", "content": "用三句话解释为什么天空是蓝色的。"}]
}'
The server returns the reasoning in reasoning_content, separate from the answer. To turn thinking off for one request, add "chat_template_kwargs": {"enable_thinking": false}.
Tool calling works through the standard tools field. llama-server parses the model's calls into tool_calls, and tool results can be passed back as tool messages.
Use the same settings as Bonsai 2. Our evaluations used the thinking-mode settings:
- Thinking mode (default):
temperature=1.0,top_p=0.95,top_k=20,min_p=0.0,presence_penalty=1.0,repetition_penalty=1.0- Non-thinking mode:
temperature=0.7,top_p=0.80,top_k=20,min_p=0.0,presence_penalty=1.5,repetition_penalty=1.0
Avoid greedy decoding with thinking on.
With thinking on, allow at least 8,192 output tokens. The model tends to think for a long time, even on simple prompts and on questions about itself. For short answers, turn thinking off.
No system prompt is needed. Without one, the model introduces itself as Rina Juvenile. If a system prompt gives the assistant a different name or persona, the model was trained to follow it, though not reliably (see Limitations).
The embedded template uses Bonsai 2's ChatML format with <think> blocks. Thinking stays on unless enable_thinking is set to false. The only change from Bonsai 2's template is how tool-call arguments in the conversation history are written: non-string values are serialized as JSON, the way Qwen3.8 does it.
All comparisons are against the original Bonsai 2 2B (PQ2_0), run through the same harness with the same prompts and settings.
| Language | Prompts | Rina wins | Bonsai 2 wins | Ties | Rina win rate | Sign test p |
|---|---|---|---|---|---|---|
| Chinese | 100 | 49 | 28 | 23 | 0.605 | 0.022 |
| Japanese | 100 | 49 | 22 | 29 | 0.630 | 0.002 |
| Both | 200 | 98 | 50 | 52 | 0.618 | < 0.001 |
</think>), labeled A and B. It does not see the reasoning, and it does not know which model wrote which answer.| Benchmark | Items | Bonsai 2 2B | Rina Juvenile Exp | Δ | Sign test p |
|---|---|---|---|---|---|
| IFEval (prompt-level strict) | 541 | 87.8 | 81.1 | −6.7 | < 0.001 |
| IFBench (prompt-level strict) | 300 | 52.0 | 40.7 | −11.3 | < 0.001 |
| GSM8K | 500 | 87.4 | 85.6 | −1.8 | 0.23 |
| MMLU-Redux | 500 | 71.2 | 68.4 | −2.8 | 0.18 |
| CMMLU | 500 | 50.0 | 51.2 | +1.2 | 0.65 |
| JMMLU | 500 | 56.2 | 53.0 | −3.2 | 0.19 |
| BFCL v3 (overall) | full | 60.6 | 49.9 | −10.7 | — |
We compared the GGUF files in llama.cpp (CUDA) with the PyTorch training model over 4,599 positions of reference text. On CUDA the three files produced bit-identical logits (compared directly over 2,044 positions; identical KL statistics over all 4,599), so one row covers all three:
| Model | Mean KL | Top-1 agreement |
|---|---|---|
| Rina Juvenile Exp (all three files) | 0.00026 | 98.93% |
| Bonsai 2 2B PQ2_0, same text | 0.00029 | 99.11% |
Our files match the trained weights about as closely as Bonsai 2's own release matches its weights.
On CPU each packing uses different kernels, so the outputs differ slightly. We compared the three packings using llama.cpp on CPU over 2,044 positions with PQ2_0 as the reference. Bonsai 2's own three files differ from each other by the same amount:
| Files | Q2_0 vs PQ2_0: mean KL / top-1 | PTQ1_0 vs PQ2_0: mean KL / top-1 |
|---|---|---|
| Rina Juvenile Exp | 0.00027 / 99.17% | 0.00027 / 99.22% |
| Bonsai 2 2B | 0.00032 / 99.02% | 0.00033 / 99.07% |
Rina Juvenile Exp keeps Bonsai 2's architecture, tokenizer and ternary format, and the model stays ternary through every stage. Training stays in Bonsai 2's Hadamard-rotated basis, so the result packs back into the same GGUF layout.
What was actually trained. Every stage was set up as quantization-aware training: full-precision latent weights are ternarized in the forward pass, and the group-wise scales are trained alongside them. After release preparation we found a bug in our straight-through estimator: under the non-reentrant gradient checkpointing used in all stages, the gradients for the latent weights of the transformer layers were dropped. In practice, the parameters that learned were:
The 6.3% of ternary values that differ from Bonsai 2 come from these changes: a new scale moves the rounding threshold for its group, and the embedding matrix was trained directly. All results on this card were measured on the released files and are unaffected. The bug is fixed for later models.
| Stage | What | Data | Training signal |
|---|---|---|---|
| 1. Continued pretraining | 1.11B tokens, 4K sequences, LR 3e-4 with warmup-stable-decay | Chinese, Japanese, English, math and code web text, plus replay (see below) | Logit distillation from Qwen3.5-4B, mixed with next-token loss |
| 2. SFT | ~147K sequences (271M tokens), one epoch | Chinese and Japanese dialog (single and multi-turn, with and without system prompts), math, tool calling, English instruction following, code, identity | Responses mainly from DeepSeek V4.1 Flash; top-20 logit distillation from Qwen3.8-27B |
| 3. RL | 100 steps, 64 prompts × 8 samples per step, LR 1e-5, up to 12,288 output tokens | Math, English and Chinese/Japanese instruction following, tool calling | Verifiable rewards |
| 4. Identity patch | 142 steps, LR 4e-5 | The stage 3 model's own answers to identity questions, plus replay | KL to the stage 3 model on replay |
Stage 1: continued pretraining.
Stage 2: SFT.
Stage 3: RL.
Stage 4: identity patch.
Compute:
Not an overall upgrade over Bonsai 2.
Chinese and Japanese quality is still modest. The judge and our own review of the blind answers found:
Do not rely on the model for medical, legal, financial or other high-stakes information.
Long thinking. Even simple prompts can use thousands of reasoning tokens. Turn thinking off for quick answers.
Identity is not fully reliable. These figures are for held-out identity questions with no system prompt:
| Thinking off | Thinking on | |
|---|---|---|
| Gives the name Rina Juvenile | 92% | 72% |
| Fully correct: name, developer and base model, with nothing invented | 64% | 14% |
Text only. No image input; Bonsai 2's mmproj is not supported.
Context. Trained on sequences up to 16K tokens. Long-context behavior is untested.
Safety. There was no dedicated safety training or red-teaming beyond what the base model and the teacher-generated data provide.
Asked about itself, the model answers that it is Rina Juvenile, developed by Rinstitute, built on Ternary Bonsai 2 2B by Prism ML, which derives from Qwen3.5-2B.
Created using Bonsai by Prism ML. Rina Juvenile is built on Ternary Bonsai 2 2B (Apache 2.0, © Prism ML), which is built from Qwen3.5-2B (Apache 2.0, © Alibaba Cloud).
Teachers. We used their outputs or logits only. No teacher weights are included in this model.
Continued-pretraining corpora. Licenses are as stated by each source. Web-derived sets are also subject to the Common Crawl terms of use.
| Source | Use | License |
|---|---|---|
| epfml/FineWeb2-HQ | Chinese web | ODC-BY 1.0 |
| HuggingFaceFW/finepdfs-edu | Chinese and Japanese PDFs | ODC-BY 1.0 |
| hotchpotch/fineweb-2-edu-japanese | Japanese web | ODC-BY 1.0 |
| llm-jp-corpus v4: KAKEN, 国会会議録 (Diet proceedings), WARP HTML, 青空文庫 (Aozora Bunko) | Japanese | CC BY 4.0 |
| HuggingFaceFW/fineweb-edu | English web | ODC-BY 1.0 |
| HuggingFaceTB/dclm-edu | English web | CC BY 4.0 |
| wikimedia/wikipedia (zh, ja, en) | Encyclopedia | CC BY-SA 3.0 / GFDL |
| HuggingFaceTB/finemath (FineMath-4+, InfiWebMath-4+) | Math | ODC-BY 1.0 |
| common-pile/stackv2_edu_filtered | Code | Openly licensed source files (per-file licenses in the dataset) |
SFT and RL prompt sources. All responses were newly generated.
| Source | Use | License |
|---|---|---|
| openai/gsm8k (train) | Math problems | MIT |
| EleutherAI/hendrycks_math (train) | Math problems | MIT |
| AI-MO/NuminaMath-1.5 (cn_k12, olympiads) | Math problems | Apache 2.0 |
| nvidia/OpenMathReasoning, © NVIDIA | Math problems (problems and answers only) | CC BY 4.0 |
| yamaTK/japanese-math-synthetic-108k | Japanese math problems | Apache 2.0 |
| math-eval/TAL-SCQ5K | Chinese math problems | MIT |
| bigcode/self-oss-instruct-sc2-exec-filter-50k | Python coding tasks; some translated into Chinese and Japanese | ODC-BY |
| IFEval instruction registry | Constraint phrasings for English instruction following | Apache 2.0 |
Chat, tool-use, system and identity prompts were synthesized by DeepSeek V4.1 Flash from our own topic and persona specifications.
Apache 2.0, following Bonsai 2 and Qwen3.5. See LICENSE and NOTICE.
prism-ml/Ternary-Bonsai-2-2B-gguf