Lumi-Simy / README.md
joaohsim's picture
card: aviso
700da8d verified
|
Raw History Blame Contribute Delete
14.1 kB
metadata
language:
  - pt
  - en
license: other
license_name: lumi-4b
license_link: https://huggingface.co/ceia-research/lumi-4b
base_model: ceia-research/lumi-4b
base_model_relation: finetune
tags:
  - tool-calling
  - function-calling
  - agent
  - reasoning
  - lora
  - portuguese
datasets:
  - ibm-research/VAKRA
  - Polygl0t/gigaverbo-v2-sft
  - allenai/tulu-3-sft-personas-instruction-following
  - Polygl0t/gsm8k-pt
  - TIGER-Lab/WebInstruct-verified
  - NousResearch/hermes-function-calling-v1
  - nvidia/When2Call
pipeline_tag: text-generation

Lumi-Simy

Lumi-Simy is a 4B tool-calling / agentic model built on top of Lumi-Think-4B (Mateus Nery), itself derived from CEIA Lumi-4B (NLP team, CEIA/UFG) and NVIDIA Nemotron 3 Nano 4B. It was post-trained with LoRA SFT to choose tools, chain several calls while reading their results, make parallel calls, abstain when no tool fits, and then answer — with thinking enabled.

Lumi-Simy is a personal study and learning project: it was built to learn, test and document post-training for tool use on a small hybrid model, starting from a model that had already been post-trained for reasoning (Lumi-Think-4B, by Mateus Nery). It is not intended for production use.

This release targets tool use only. Post-training was designed so that it would not cost anything elsewhere: on general benchmarks in Portuguese and English, Lumi-Simy stays at the level of its base model.

Highlights

  • Agentic tool use: on VAKRA (IBM Research), on 5 database domains never seen in training, accuracy goes from 12.2% → 32.7% (capability 1) and 16.5% → 51.7% (capability 2; 60.3% with the tool router below, on par with the 21B teacher).
  • Function calling (BFCL): multi-turn base 25.0 → 43.0; parallel 76.5 → 81.0; live parallel multiple 41.7 → 70.8, while keeping irrelevance detection at the base level.
  • General capabilities retained: Portuguese and English general benchmarks stay at the Lumi-Think level, thanks to self-distilled replay data mixed into the tool-use training.

Release History

  • Nov 21, 2026: Released Lumi-Simy.

Model Details

  • Model type: hybrid Mamba-2 / MLP / attention (Nemotron-H); see the NVIDIA model card.
  • Base model: Lumi-Think-4B (converted from GGUF to safetensors).
  • Language(s): Portuguese, English.
  • Compute: trained and evaluated on a single NVIDIA RTX 4090 (24 GB).
  • Method: LoRA SFT merged into the weights (r = 32, α = 32; Mamba in_proj/out_proj, MLP up/down_proj, attention q/k/v/o_proj; 41.4M trainable parameters), 2 epochs, lr 1e-4, 20,480-token context.
  • Contact: joaohsim on Hugging Face

Model Performance

All numbers come from our own runs, with the same protocol for every model (thinking on, temperature 1.0, top_p 0.95); they are not taken from official leaderboards. Paired tests (McNemar) are against Lumi-Think.

Agentic: VAKRA (validation split of 5 unseen domains; local gpt-oss-20b judge)

Model Capability 1 (BI APIs) Capability 2 (dashboard APIs)
Lumi-Think-4B 12.2 16.5
Qwen3-4B, thinking (external reference) 39.2 48.3
Lumi-Simy 32.7 51.7
Lumi-Simy + router 33.1 60.3
gpt-oss-20b (teacher, 21B) 48.2 57.0

Best score in each column in bold. Against Lumi-Think (paired McNemar): +20.4 pp on capability 1 (p = 3×10⁻¹¹) and +35.1 pp on capability 2 (p = 10⁻²²). Against Qwen3-4B (its own parsers, 40,960-token context, same harness, no router): a statistical tie (capability 1 −6.5 pp, p = 0.06; capability 2 +3.3 pp, p = 0.34). Note that Lumi-Simy was fine-tuned on trajectories from the VAKRA training domains, so the task format is familiar to it, while Qwen3-4B runs zero-shot; BFCL below, which neither model was trained on, is the even-footing comparison. With the router, capability 2 is 3.3 pp above the 21B teacher (p = 0.4, a statistical tie).

Function calling: BFCL (v3 categories, bfcl-eval 2025.12.17, FC mode)

Category Lumi-Think Nemotron 3 Nano 4B Lumi-Simy Qwen3-4B (external reference)
simple_python 90.2 95.0 94.2 95.5
multiple 89.5 94.5 90.0 97.5
parallel 76.5 56.5 81.0 91.0
parallel_multiple 73.5 56.0 72.0 90.0
irrelevance 82.5 75.8 80.8 80.0
live_simple 76.0 79.8 76.7 86.0
live_multiple 72.4 73.7 72.7 81.6
live_parallel 62.5 31.2 75.0 75.0
live_parallel_multiple 41.7 37.5 70.8 87.5
live_irrelevance 75.7 76.4 77.0 77.0
live_relevance 68.8 93.8 87.5 81.2
multi_turn_base 25.0 23.0 43.0 39.0
multi_turn_miss_func 10.5 31.5 30.5 25.5
multi_turn_miss_param 19.0 26.0 31.5 29.5
multi_turn_long_context 13.0 23.5 31.0 24.5

Best score in each row in bold. Qwen3-4B was served with its own parsers (hermes tool parser, qwen3 reasoning parser) and its maximum context of 40,960 tokens; 22 multi_turn_long_context items exceed that limit and count as errors (the Nemotron-H models were served with 65,536 tokens, which Lumi-Simy exceeds on 2 items and Lumi-Think on 3). Qwen3-4B is the stronger single-turn and parallel caller; Lumi-Simy is ahead of it on all four multi-turn categories, and the best of the four models on three of them.

Capability retention: general benchmarks (Portuguese and English)

Tool use is the goal of this release; these benchmarks check that it did not come at the expense of general capabilities. Against Lumi-Think, the average differs by −0.2 pp (paired McNemar, p = 0.68), and no individual benchmark changes significantly.

Benchmark Lumi-4B v0.2 Nemotron 3 Nano 4B Lumi-Think Lumi-Contexto T6-Lumi Lumi-Simy
MMLU-PT (high school) 83.2 82.6 83.8 84.3 79.8 82.2
MMLU-PT (college) 77.9 79.1 79.6 78.7 73.4 81.4
Global-MMLU PT 73.1 69.6 72.9 73.0 70.1 71.9
MMMLU PT 64.2 63.0 59.8 64.6 57.9 62.2
INCLUDE PT 65.2 66.2 68.2 64.4 64.2 68.2
IFEval-PT 60.0 86.0 86.3 73.0 63.7 83.0
MMLU-Pro 57.7 61.9 62.0 58.6 59.4 61.9
MMLU-Redux 2 81.5 81.7 82.2 81.2 81.9 82.6
IFEval (EN) 65.4 86.7 84.3 76.0 72.6 84.5
Average of the 9 tests above 71.8 75.1 75.8 73.6 71.1 75.6
GSM8K-PT 88.3 89.3 90.2 89.4 89.0 91.4
MMLU-ProX PT 57.0 57.9 61.5 56.2 53.5 59.5
ENEM 84.6 80.0 83.8 83.1 82.2 84.9
BLUEX 79.6 76.3 81.0 79.5 77.3 80.2
OAB 37.0 38.5 45.7 34.9 42.9 46.8

All models answered the same items with the same protocol, so the comparison between columns is direct. Our protocol reproduces the Lumi-Think card within ~2 pp on the five benchmarks that use the same item source (Global-MMLU PT, INCLUDE PT, MMLU-Pro, MMLU-Redux 2, IFEval EN); our MMLU-PT, MMMLU PT and IFEval-PT are different versions of those sets (other item sources or translations; 254 MMMLU items), so their absolute numbers are not comparable to the ones in the Lumi-Think card.

Usage

vLLM

Serve with thinking on, the qwen3_coder tool parser and the nano_v3 reasoning parser shipped in this repository:

uv venv --python 3.12 --seed && source .venv/bin/activate
uv pip install vllm openai huggingface_hub
hf download joaohsim/Lumi-Simy --local-dir lumi-simy
VLLM_USE_FLASHINFER_SAMPLER=0 vllm serve ./lumi-simy --trust-remote-code --mamba-ssm-cache-dtype float32 \
  --enable-auto-tool-choice --tool-call-parser qwen3_coder \
  --reasoning-parser-plugin "$PWD/lumi-simy/nano_v3_reasoning_parser.py" --reasoning-parser nano_v3 \
  --default-chat-template-kwargs '{"enable_thinking": true}' --max-model-len 32768 --max-num-seqs 16

These are the settings we evaluated with: --max-model-len keeps the KV cache within a 24 GB GPU, the reasoning-parser plugin needs an absolute path, and VLLM_USE_FLASHINFER_SAMPLER=0 avoids a FlashInfer JIT build (which requires nvcc).

from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
tools = [{"type": "function", "function": {
    "name": "get_weather", "description": "Current weather for a city.",
    "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}]
r = client.chat.completions.create(
    model="./lumi-simy",
    messages=[{"role": "user", "content": "Como está o tempo em Goiânia e em São Paulo agora?"}],
    tools=tools, temperature=1.0, top_p=0.95, max_tokens=6144)
print(r.choices[0].message.tool_calls)
# [ChatCompletionMessageFunctionToolCall(..., function=Function(arguments='{"city": "Goiânia"}', name='get_weather'), ...),
#  ChatCompletionMessageFunctionToolCall(..., function=Function(arguments='{"city": "São Paulo"}', name='get_weather'), ...)]

At temperature 1.0 the model usually emits both calls in parallel (2 of 3 runs in our check); otherwise it calls one city first and asks for the other after reading the tool result.

Tool router (recommended for large tool catalogs)

With many tools (VAKRA capability 2 has ~125 per question), first keep the 32 most relevant with the BAAI/bge-reranker-v2-m3 cross-encoder (Apache 2.0). On VAKRA capability 2 this adds +8.7 pp (p = 0.003) and cuts the prompt from ~21k to ~5k tokens. The router was not used in BFCL or in the general benchmarks.

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

tok = AutoTokenizer.from_pretrained("BAAI/bge-reranker-v2-m3")
rr = AutoModelForSequenceClassification.from_pretrained("BAAI/bge-reranker-v2-m3").eval()

def route(query, tools, k=32):
    if len(tools) <= k:
        return tools
    docs = [f'{t["function"]["name"]}: {t["function"].get("description", "")}' for t in tools]
    with torch.no_grad():
        b = tok([query] * len(docs), docs, padding=True, truncation=True, max_length=512, return_tensors="pt")
        s = rr(**b).logits.view(-1)
    return [tools[i] for i in s.argsort(descending=True)[:k].tolist()]

Best Practices

Keep thinking enabled and use the chat template shipped with the checkpoint. Evaluation used temperature 1.0, top_p 0.95 and up to 6,144 new tokens per turn; contexts up to 20,480 tokens were seen in training.

Unvalidated use cases

  • Agentic scenarios other than database APIs (VAKRA) and BFCL (e.g., web browsing, coding agents, τ²-bench).
  • Capability 1 of VAKRA (long chains of calls) remains well below the 21B teacher (32.7% vs 48.2%).

Training Datasets

4,329 examples (17.5M tokens, 2.3M with loss). Everything that is not VAKRA was answered by Lumi-Think itself (self-distillation with rejection sampling), so the model trains on its own reasoning style:

Part Source Examples Filter
Agentic VAKRA (CC BY-NC-SA 4.0), 22 training domains; trajectories of gpt-oss-20b as teacher 1,629 steps judge + gold answer; one example per step
General PT replay Polygl0t/gigaverbo-v2-sft 593 complete answer
Instruction following replay allenai/tulu-3-sft-personas-instruction-following 395 complete answer
Reasoning replay Polygl0t/gsm8k-pt (train split), TIGER-Lab/WebInstruct-verified 567 + 320 correct answer (4 samples)
Tool calls (incl. 343 parallel) NousResearch/hermes-function-calling-v1 528 calls equal to the reference
When not to call nvidia/When2Call train_sft 297 answered without calling

Risks and Limitations

Lumi-Simy may generate inaccurate, biased, or unsupported content, call tools with wrong arguments, or loop on calls. Reasoning in tool tasks is mostly in English (inherited from the teacher and Lumi-Think). Assess the model in the context of your application, especially before letting it call tools with side effects.

License

Lumi-Simy follows the license of its base, CEIA Lumi-4B, which derives from NVIDIA Nemotron 3 Nano 4B (NVIDIA Nemotron Open Model License). Its agentic training data come from VAKRA (CC BY-NC-SA 4.0), so this release is intended for academic, non-commercial use: it is a study project, shared so that others can learn from and reproduce it. Check those terms before using Lumi-Simy.

Acknowledgements

We thank Mateus Nery for Lumi-Think-4B and the NLP team at CEIA/UFG for Lumi-4B; NVIDIA for Nemotron 3 Nano 4B; IBM Research for VAKRA; OpenAI for gpt-oss-20b (teacher and judge); BAAI for bge-reranker-v2-m3; and the authors of the datasets listed above.

Authors

João Simielli (joaohsim).

How to cite

@misc{simielli2026lumisimy,
  title        = {Lumi-Simy},
  author       = {Simielli, João},
  year         = {2026},
  howpublished = {Hugging Face model repository},
  url          = {https://huggingface.co/joaohsim/Lumi-Simy}
}

References

[NVIDIA] Nemotron 3 Nano 4B Model Card · CEIA Lumi-4B · VAKRA · BFCL · When2Call