Instructions to use TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp
- SGLang
How to use TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp 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 "TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp" \ --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": "TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp", "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 "TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp" \ --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": "TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp with Docker Model Runner:
docker model run hf.co/TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp
TrustLLM v2 8B SFT, mix B2 (experimental)
A nine-language SFT model from the TrustLLM project, trained at 8,192 tokens of context on a larger and more varied instruction mix than the earlier releases.
Experimental. This recipe did not pass our pre-registered release check, now scored over three seeds. We trained the same recipe with three seeds (420000, which is this model, plus 420001 and 420002) and compared each with the released 8k model. Pooled over the three seeds, it missed two limits, both narrowly: English ARC-Challenge fell 1.51 points where the limit was 1.5 (all three seeds were lower), and 8k passkey retrieval at 10% depth was 26 of 30 where the limit was 27 (seed 420002 scored 6/10; this model scored 10/10). The Icelandic instruction-following gain replicated: Icelandic Multi-IFEval +5.2 points, higher in all three seeds. English math (+7.2) also replicated. The TrustLLM project releases this model as a separate experimental model. The other two seeds are not public. For general use, prefer TrustLLMeu/trustllm-v2-8b-sft-8k or TrustLLMeu/trustllm-v2-8b-sft.
Revision note, 9 Oct 2026: this card first reported one seed (English ARC −2.1 against −1.5). It now reports the three-seed result (see "Three-seed result"). The weights are unchanged.
Identity. Asked who it is, the model says it is a language model developed in the TrustLLM project.
Research-only; not for redistribution or commercial use. Access requests are reviewed manually by the TrustLLM project, under the same access conditions as the base model.
How this model differs from trustllm-v2-8b-sft-8k
| trustllm-v2-8b-sft-8k ("8k model") | this model | |
|---|---|---|
| Path from the base | base step 120,000 → midtraining 2,500 → nine-language SFT M3 (2,048 steps at 4,096 tokens) → 8k continuation (256 steps at 8,192 tokens) | base step 120,000 → midtraining 2,500 → one SFT run of 6,144 steps at 8,192 tokens, from the midtraining weights with a fresh optimizer |
| SFT token positions | about 0.54B (M3) + 0.13B (continuation) | 3.22B |
| Data | Dolci-Instruct export and project translations into eight languages; 25% long-context retrieval in the continuation | about 40 sources: Dolci and its translations, plus English chat, instruction-following, tool-use, RAG, safety and math sets, native Icelandic and Faroese data, Danish, Swedish, Dutch and German sets; 5% long context (table below) |
| Tool-call arguments | as in Dolci | typed: numbers, booleans, lists and objects follow their schema type (see "Data") |
| Document masking in packed rows | none: packed conversations could attend to each other (a bug in our loader) | conversations attend only to themselves (fixed) |
Router bias (expert_bias) in the files |
rounded to bf16 in the original release (see that card for later revisions) | float32 |
| Its own pre-registered check | passed when pooled over three seeds (the released seed alone missed two limits narrowly) | failed when pooled over three seeds: English ARC −1.51 (limit −1.5) and 8k passkey at 10% depth 26/30 (limit 27/30); this seed alone failed on English ARC by 0.6 points |
Lineage of this model:
- Base: TrustLLMeu/trustllm-v2-8b, final pretraining step 120,000.
- General midtraining by Jiangtao Wang and Andreas Bueff (TrustLLM project): 2,500 steps, about 84B tokens, 8,192-token context. Published as TrustLLMeu/trustllm-v2-8b-midtrain.
- SFT, mix B2 (this model): 6,144 steps at 8,192 tokens.
Model and training
Same architecture as the other TrustLLM v2 8B releases: approximately 7.19 billion total parameters, 24 layers, 64
routed experts with top-8 routing and one shared expert. The repository contains BF16 weights, except the 23 MoE router
bias tensors (expert_bias), which are stored in float32 (see "Loading notes"). It also contains the tokenizer, chat
template, generation configuration and the custom OptMoE model code.
| Setting | Value |
|---|---|
| Starting point | Midtraining step 2,500 (model weights only), fresh optimizer state |
| Context length | 8,192 tokens |
| Global batch size | 64 packed sequences (524,288 token positions per step) |
| Training steps | 6,144 (3.22B packed token positions) |
| Optimizer | DiSCO, learning rate 0.1: 64 warmup steps, then linear decay to 0 over the last 50% of steps |
| MoE load balancing | Expert-bias update on (as in the earlier releases) |
| Objective | Assistant-only loss, normalised over the whole batch; best-fit conversation packing; no thinking mode |
| Seed | 420000 (two more seeds of the same recipe, 420001 and 420002, were trained for the three-seed check and are not public) |
| Hardware | 32 H100 GPUs at MareNostrum 5, 2.7 hours |
Training note. The training loss spiked several times in the first two thirds of training: the largest spike reached 11.1 (step 1,738), and the last came at step 4,335. Each time the loss returned to its previous level. There was no spike in the last 1,809 steps, and the released checkpoint is the final step. We believe the spikes come from the MoE expert-bias update, as in our earlier runs, but we have not confirmed this.
Data
The data are nine-language instruction conversations from about 40 sources, filtered, deduplicated and decontaminated by the TrustLLM project. 16.8 million normalised rows went through these steps:
- structure checks;
- a filter against other models' identity claims;
- repetition and loop filters;
- language identification with OpenLID-v3, including a check that the answer is in the language of the request;
- an Icelandic check for Scandinavian endings grafted onto Icelandic words;
- a Faroese word-form check;
- a length limit of 8,192 tokens;
- exact and near-duplicate removal;
- a screen for politically one-sided answers in rows generated by Qwen, DeepSeek, GLM and Kimi models, judged by a local model;
- decontamination against every evaluation set we use, including all of Belebele, GSM8K, MGSM, BFCL and Multi-IFEval.
Typed tool arguments (what "B2" adds to mix B). Some open tool-use data writes numbers and lists as strings where
the function schema expects a number or a list (f(count="10") for an integer count). We rewrote every such argument
to its schema type when the string parses to exactly that type, and changed nothing else: 22,973 calls in 20,362 rows of
Nemotron Agentic v2, 93 calls in Dolci and 23 in xLAM. Quoted numbers whose schema says "string" (ids, zip codes) were
left as they are.
| Stream | Share of tokens | Main sources |
|---|---|---|
| English | 46.8% | Dolci-Instruct (our export), OpenEuroLLM-Excellent-SFT, Nemotron IF-Chat v2 (capped at 50k rows), tool use (Nemotron Agentic v2, Toucan, xLAM, APIGen-MT, ToolACE, Hermes, When2Call), grounded QA (glaive RAG), safety (Nemotron Safety v1), math (NuminaMath-CoT) |
| Icelandic | 12.3% | Dolci translated by the project, native Icelandic data (organic sources, Vísindavefur articles), Icelandic Flan, icelandic-dyna-instruct, GSM8K-IS train, translated preference data |
| German | 8.0% | Nemotron v2 German split, OpenEuroLLM Dolci translations and EU-Instruct, German RAG sets, Dolci translated by the project |
| Dutch | 7.0% | OpenEuroLLM Dolci translations and EU-Instruct, UltraChat Dutch, Dolci translated by the project |
| Swedish | 6.0% | OpenEuroLLM Dolci translations, translated preference data, Dolci translated by the project |
| Long context | 5.0% | Wikipedia retrieval conversations of 4.5k to 7.8k tokens in nine languages |
| Faroese | 4.0% | Dolci translated by the project, Faroese Flan, faroese-dyna-instruct, Setur/fo-instruct (human-written, three passes) |
| Danish | 3.9% | Dolci translated by the project, Danish tool dialogues, oasst2 |
| Norwegian Bokmål | 3.5% | Dolci translated by the project |
| Norwegian Nynorsk | 3.5% | Dolci translated by the project |
- Each stream also holds a few rows that language identification moved there from an English source.
- Identity: we removed the OLMo identity rows from Dolci and added 189 TrustLLM identity conversations in the nine languages.
- Removed: every row generated by a Llama model was dropped at the source.
- Translated data: most non-English data is machine-translated or synthetic. The project's own Dolci translations were made with Gemini Flash. The OpenEuroLLM Swedish, Dutch and German Dolci translations were made with Gemma. Rows generated by Qwen, DeepSeek, GLM and Kimi models are included; their output terms apply.
- Full inventory, licences and processing log: on request from the TrustLLM project.
Evaluation against trustllm-v2-8b-sft-8k
The release check. Before training we registered a check against the released 8k model, trustllm-v2-8b-sft-8k, seed 420000, scored with its exact float32 router biases ("baseline"). To pass, a candidate needed:
- at least one gain: Icelandic GSM8K +2 points, Icelandic BFCL +5, Icelandic Multi-IFEval +5, or an Icelandic and Faroese composite +0.01, each confirmed by a 95% bootstrap interval above zero;
- and no harm: every Belebele language at least −1.5 points; ARC (Icelandic, English) at least −1.5; Icelandic WinoGrande at least −2; Faroese grammar at least −1.5; English GSM8K at least −2; native-text loss upper bound at most +0.02; grafted endings at most baseline + 1 per 1,000 words; degenerate answers at most 10%; a passed generation smoke test; passkey at 8k at least 9/10 at each depth; and refusal of harmful prompts at most 5 points below the baseline.
We logged five changes to this check before reading any result:
- The baseline exists in float32 for one seed only, so every candidate is compared with that single seed.
- The native-text loss limit names no texts or unit. We used native Icelandic and Faroese texts only (no Nynorsk texts exist in our set), measured in nats per byte.
- BFCL, Multi-IFEval and refusal were measured with new evaluators, built for this check.
- The registration does not define the Icelandic and Faroese composite. We used our earlier definition: the mean of ARC-Challenge-is, WinoGrande-is, Belebele-is, Faroese grammar, and ScaLA-is and ScaLA-fo.
- Belebele (all 900 items), the Icelandic long-form answers, native-text loss, BFCL, Multi-IFEval and refusal had no earlier float32 baseline score, so they were measured on the baseline the same day.
For this model we also registered a primary hypothesis before training: strict Icelandic BFCL within 3 points of the baseline, and every no-harm item passing. The first half holds (−2.5 points); the second does not (English ARC).
Result for this model alone (seed 420000): did not pass. One gain is confirmed (Icelandic Multi-IFEval +7.1); one no-harm limit is missed (English ARC −2.1 against −1.5). Faroese grammar is −1.5, at its limit. The table below is for this model; the three-seed result follows it.
| this model | baseline | difference [95% CI] | |
|---|---|---|---|
| ARC-Challenge acc_norm, English (n = 1,172) | 0.361 | 0.382 | −2.1 [−4.4, +0.3] points (limit −1.5: missed) |
| ARC-Challenge acc_norm, Icelandic translation | 0.332 | 0.339 | −0.7 [−3.2, +1.8] |
| WinoGrande, Icelandic (partial scoring) | 0.525 | 0.528 | −0.3 [−3.8, +3.2] |
| Faroese grammar pairs (accuracy) | 0.745 | 0.760 | −1.5 [−2.6, −0.4] |
| ScaLA acceptability, AUROC: is / fo | 0.562 / 0.559 | 0.553 / 0.560 | |
| Icelandic and Faroese composite (0 to 1) | −0.006 [−0.016, +0.006] | ||
| Belebele, all 900 items: is / en / da / de / nb / nl / sv | 0.363 / 0.374 / 0.339 / 0.354 / 0.347 / 0.350 / 0.361 | 0.340 / 0.376 / 0.333 / 0.359 / 0.337 / 0.342 / 0.372 | between −1.1 (sv) and +2.3 (is) |
| GSM8K test, Icelandic translation (n = 1,319) | 0.296 | 0.296 | +0.0 [−2.9, +2.7] |
| GSM8K test, English (n = 1,319) | 0.478 | 0.398 | +8.0 [+5.1, +10.9] |
| Multi-IFEval, Icelandic, prompt-level loose (n = 478) | 0.667 | 0.596 | +7.1 [+2.9, +11.5] |
| BFCL v3 AST, Icelandic, mean of 4 categories (strict) | 0.540 | 0.565 | −2.5 |
| BFCL v3 AST, English, mean of 4 categories (strict) | 0.536 | 0.606 | −7.0 |
| BFCL irrelevance (no call when none fits), Icelandic | 0.592 | 0.067 | +52.5 |
| Native text loss, nats per byte: is / fo (lower is better) | 0.631 / 0.748 | 0.687 / 0.810 | −0.056 [−0.061, −0.051] / −0.062 [−0.069, −0.055] |
| Passkey at 8k, depths 10/50/90% | 10/10, 10/10, 10/10 | 10/10, 4/10, 10/10 | |
| Grafted Scandinavian endings per 1,000 Icelandic words | 0.152 | 0.056 | within the limit (+1) |
| Degenerate answers (Icelandic long-form) | 0.5% | 0% |
Native text loss is measured on native Icelandic (Vísindavefur answers published after 2022, Wikipedia) and native
Faroese (news, Wikipedia) texts. The baseline was scored with its exact float32 router biases, as in the 8k model's current
main. In the same passkey test that revision retrieves the passkey at 50% depth in 2 to 4 of 10 trials (three runs),
while the previous revision with bf16-rounded biases (tag bf16-bias-2026-10-07) retrieves it 10 of 10 times; the 8k
model's card explains this. This model scores 10 of 10 at every depth.
Three-seed result
Before seeds 420001 and 420002 were trained, we registered how the three seeds would be scored. Each seed is compared with the same baseline on the same items. A gain counts only if all three seeds differ from the baseline in the same direction and the 95% bootstrap interval of the pooled difference (mean over seeds) excludes zero. Each no-harm limit applies to the pooled difference; passkey is summed over the seeds (limit 27 of 30 at each depth). The other rules are unchanged.
Result: did not pass. One gain is confirmed: Icelandic Multi-IFEval. Two no-harm limits are missed: English ARC and 8k passkey at 10% depth. The primary hypothesis also fails: strict Icelandic BFCL holds (−2.5 points pooled, within 3), but not every no-harm item passes.
| Difference from the baseline (points unless noted) | seed 420000 (this model) | seed 420001 | seed 420002 | pooled [95% CI] | counts as |
|---|---|---|---|---|---|
| Multi-IFEval, Icelandic, prompt-level loose | +7.1 | +1.5 | +6.9 | +5.2 [+1.6, +8.7] | gain confirmed |
| GSM8K, Icelandic translation | +0.0 | +8.7 | +8.0 | +5.6 [+3.3, +7.9] | not confirmed (one seed at 0) |
| BFCL v3 AST, Icelandic, all items (strict) | +0.4 | −1.4 | +3.0 | +0.7 [−2.2, +3.6] | no gain |
| Icelandic and Faroese composite (0 to 1) | −0.006 | +0.032 | −0.018 | +0.003 [−0.007, +0.012] | no gain |
| ARC-Challenge acc_norm, English | −2.1 | −0.6 | −1.8 | −1.51 [−3.6, +0.5] | limit −1.5: missed |
| ARC-Challenge acc_norm, Icelandic | −0.7 | −0.3 | −2.4 | −1.1 [−3.2, +0.9] | within limit |
| WinoGrande, Icelandic | −0.3 | −0.6 | −1.5 | −0.8 [−3.6, +2.2] | within limit |
| Faroese grammar pairs | −1.5 | +7.6 | −5.5 | +0.2 [−0.7, +1.1] | within limit |
| Belebele, lowest language | −1.1 (sv) | −0.9 (da) | −1.8 (en) | −0.5 (de) | within limit |
| GSM8K test, English | +8.0 | +6.4 | +7.1 | +7.2 [+4.6, +9.6] | within limit (higher in all seeds) |
| Native text loss, nats per byte: is / fo | −0.056 / −0.062 | −0.033 / −0.010 | −0.039 / −0.027 | −0.043 / −0.033 | lower (better) in all seeds |
| Passkey at 8k, 10% / 50% / 90% depth (of 10) | 10 / 10 / 10 | 10 / 10 / 10 | 6 / 10 / 10 | 26 / 30 / 30 | 10% depth: limit 27 missed |
| Grafted Scandinavian endings per 1,000 Icelandic words (baseline 0.056) | 0.152 | 0.084 | 0.086 | within limit | |
| Refusal rate, English / Icelandic (baseline 0.495 / 0.457) | 0.545 / 0.547 | 0.537 / 0.563 | 0.560 / 0.545 | +5.2 / +9.5 | within limit |
| Strict BFCL, Icelandic, mean of 4 categories (baseline 0.565) | 0.540 | 0.516 | 0.564 | 0.540 | primary hypothesis holds (−2.5) |
| BFCL irrelevance, Icelandic (baseline 0.067) | 0.592 | 0.371 | 0.417 |
Belebele covers is, en, da, de, nb, nl and sv (900 items each); Icelandic Belebele is +2.1 to +2.3 points in every seed. Each seed passed the generation smoke test, and no seed's degenerate-answer rate exceeded 0.5%.
How we read this:
- English ARC is lower in all three seeds (−0.6 to −2.1 points). The pooled −1.51 misses the limit by 0.01 points, and its interval includes zero. Because every seed is lower, we read it as a small real loss of this recipe rather than one seed's noise.
- The Icelandic Multi-IFEval gain is real but varies by seed: +7.1 and +6.9 for two seeds, +1.5 for the third.
- 8k passkey at 10% depth is seed-dependent: 10/10 for this model and seed 420001, 6/10 for seed 420002. Use your own long-context checks before relying on retrieval near the start of an 8k context.
- Faroese grammar swings between seeds (−5.5 to +7.6 points), more than any other item. Single-seed Faroese grammar results from this recipe should not be trusted (see "How this model differs from the other models of the same experiment").
Safety (refusal of harmful requests). 600 harmful prompts from XSafety and Aya red-teaming, each asked in English and in Icelandic, greedy answers of up to 512 tokens, judged by a local gpt-oss-20b. The judge parsed every verdict.
| this model | baseline | |
|---|---|---|
| Refusal rate, English | 0.545 | 0.495 |
| Refusal rate, Icelandic | 0.547 | 0.457 |
| Answers cut off at 512 tokens: en / is | 9.3% / 21.7% | 8.2% / 31.3% |
| Refusal rate on answers not cut off: en / is | 0.581 / 0.636 | 0.519 / 0.561 |
| Multi-IFEval answers that hit the 2,048-token cap (of 478) | 51 | 77 |
Neither model refuses reliably. Do not deploy either without your own safety measures. This model writes fewer runaway answers than the baseline, which also helps its Multi-IFEval score.
How this model differs from the other models of the same experiment
This model comes from our "SFT at scale" experiment, which trained several models on the same pipeline. None of them is public. In short:
- Mix A (two seeds, and their average) has more Dolci and less tool, RAG and math data in English. Those models gain about 7 points in Icelandic GSM8K over the baseline, which this seed does not (the other two B2 seeds gain 8 to 9), but they failed the check on English ARC (−2.6, two seeds) and, for the average, on 8k passkey at mid depth.
- Mix B is this model's data without the typed tool arguments, trained with the same seed. It passed the check on the composite, driven by Faroese grammar (+8.1). That gain did not replicate in this model: with only 2% of the tool rows changed and the rows served in a different order, Faroese grammar is 9.6 points lower than mix B's. Across the three B2 seeds, Faroese grammar ranges from −5.5 to +7.6 points against the baseline, so we read mix B's +8.1 as seed-to-seed variation, not as an effect of the data. Mix B wrote numbers in tool calls as strings, which this model fixes (strict Icelandic BFCL +25.5 points over mix B).
Known issues
- Did not pass the release check, over three seeds: English ARC −1.51 pooled (limit −1.5; lower in every seed), and 8k passkey at 10% depth 26 of 30 (limit 27; one seed at 6/10). The baseline is one seed, so its own seed-to-seed variation is not in these intervals.
- No gain in Icelandic math for this seed (GSM8K-IS unchanged). The other two seeds gain 8 to 9 points, so this is seed variation; pooled, the gain is not confirmed.
- Tool calling is better than mix B but still below the baseline in English (strict BFCL 0.536 vs 0.606).
- Loss spikes during training (see "Training note").
- Absolute scores are modest: this is a research SFT model, not a tuned assistant. Translated training and evaluation data may contain translation artifacts.
Loading notes
Access approval and Hugging Face authentication are required to download the weights. Loading through Transformers
requires trust_remote_code=True. Use the supplied chat template with enable_thinking=False. The generation
configuration stops on both the end-of-text and end-of-message token IDs.
Router bias in float32. The 23 expert_bias tensors, one per MoE layer, are added to the router scores and
decide which 8 of the 64 experts each token uses. Rounding them to bf16 changes that choice: on our validation rows it
raised the loss by 0.03 nats for this checkpoint. The repository stores them in float32. The included model code keeps
them in float32 when you load with torch_dtype=torch.bfloat16 and when you call model.to(torch.bfloat16).
Tested versions. All results above were produced with Transformers 5.13.1 and PyTorch 2.11, in BF16 with eager attention. BFCL, Multi-IFEval and refusal answers were generated with vLLM 0.19.1 through its Transformers backend. The included model code was also load-tested with Transformers 4.51.3, 4.57.3 and 5.19.0. Batched left-padded generation did not match single-sequence generation in earlier tests of this architecture, so use batch size 1 with Transformers, or verify batching.
- Downloads last month
- 6
Model tree for TrustLLMeu/trustllm-v2-8b-sft-mixb2-exp
Base model
TrustLLMeu/trustllm-v2-8b