Kanata S2-8B β€” Agentic & Coding Intelligence

Kanata S2-8B is K-Ai's second approach to the Kanata agentic model family. It specializes in tool calling, multi-step problem solving, and coding, in Indonesian, Japanese, and English.

"We Build Because We Believe We Can." β€” K-Ai (Kortex AI)

K-Ai's second approach to Agentic Kanata

Kanata S1-3B (first approach) Kanata S2-8B (second approach)
Base IBM Granite 4.1 3B Base Qwen3-8B
Goal First agentic experiment Reliable multilingual agent + coding
Tool-call format Custom experiment Native Qwen3/Hermes <tool_call> format (unchanged chat template)
Data ~2.5k samples, mostly synthetic 2,400 train samples (curated within a compute budget), audited, deduplicated, leak-checked
Evaluation Small preliminary check Per-language, held-out + unseen-tool evaluation

S1 showed that a small model with a narrow dataset struggles with format validity, especially in Japanese (0% in our preliminary check). S2 addresses this with a stronger base, native tool-call serialization, per-language data coverage, and an explicit dataset audit. S1 remains available as an experimental baseline: K-Ai-Official/Kanata-S1-3B.

Kanata S2 is not a general-purpose model. For general assistance see K-Oss-9-Mini. Both may share a Qwen3-8B foundation but have different data and objectives.

Model details

  • Base model: Qwen/Qwen3-8B
  • Why the post-trained checkpoint: we first tried Qwen3-8B-Base, but its chat and tool-call special tokens were untrained, so LoRA on attention/MLP could not make it emit tool calls reliably. Kanata S2 therefore starts from the post-trained Qwen3-8B (same license).
  • Method: QLoRA (4-bit NF4), LoRA r=16, alpha=32, all attention + MLP projections; merged to 16-bit for this release
  • Context during training: 1024 tokens (the base model supports longer context; long-context behavior was not tuned or evaluated here)
  • Hardware: single NVIDIA T4 (16 GB), Google Colab
  • Training time: 71.1 min, 150 optimizer steps, one pass over the curated subset
  • Adapter only: Keanualfahd/Kanata-S2-8B-LoRA

How tool calling works

Kanata S2 only generates tool calls; your agent runtime must execute the tool and return the result in a tool message. The model never executes tools itself. It uses the standard Qwen3 chat template.

from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "Keanualfahd/Kanata-S2-8B"
tok = AutoTokenizer.from_pretrained(repo); model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto")
tools = [{"type":"function","function":{"name":"get_weather","description":"Get weather","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}]
msgs = [{"role":"user","content":"Cuaca di Bandung sekarang gimana?"}]
ids = tok.apply_chat_template(msgs, tools=tools, add_generation_prompt=True, enable_thinking=False, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=128)[0][ids.shape[1]:]))
# -> <tool_call>\n{"name": "get_weather", "arguments": {"city": "Bandung"}}\n</tool_call>

Behaviors trained: tool selection among distractors, valid JSON arguments, asking for missing required arguments, answering directly when no tool is needed, interpreting tool results, and recovering from tool errors.

Training data

All sources were schema-validated; tool calls were parsed and re-serialized into canonical JSON; exact duplicates were removed; splits are assigned by hash of the first user prompt so that no prompt appears in more than one split (leakage check: 0 overlaps). Full per-source rejection statistics are in dataset_audit.json (generated by the training notebook).

Source Module Lang License (from Hub metadata) Kept / raw
NousResearch/hermes-function-calling-v1:func_calling_singleturn hermes en apache-2.0 1,100 / 1,893
NousResearch/hermes-function-calling-v1:func_calling hermes en apache-2.0 937 / 1,893
NousResearch/hermes-function-calling-v1:glaive_func_calling hermes en apache-2.0 5,024 / 5,209
NousResearch/hermes-function-calling-v1:json_mode_agentic hermes en apache-2.0 1,342 / 1,342
m-a-p/CodeFeedback-Filtered-Instruction codefeedback en apache-2.0 12,000 / 156,526
ise-uiuc/Magicoder-OSS-Instruct-75K magicoder en mit 8,000 / 75,197
kunishou/databricks-dolly-15k-ja ja_general ja cc-by-sa-3.0 6,000 / 15,015
FreedomIntelligence/alpaca-gpt4-indonesian id_general id see card 6,000 / 49,969
synthetic (K-Ai) agentic tool calling, clarification, no-tool, error recovery id/ja/en K-Ai see notebook

Candidate pool was quality-scored per module, then a token-budgeted subset was selected (agentic and multilingual modules prioritized): 2,400 training samples, evaluated on held-out val/test splits. Training samples by language: {'en': 1272, 'ja': 564, 'id': 564}. Per-module token counts are in dataset_audit.json.

Note: the synthetic module is template-based and was capped; its tool schemas differ from the unseen-tool benchmark below. Dataset licenses differ (including share-alike sources); verify them before commercial redistribution of data derived from this model's training set.

Benchmarks

All numbers below come from eval_results.json produced by the training notebook. These are small, in-house evaluations, not standard public leaderboards. Treat them as smoke-level evidence, not a full capability measurement.

Tool calling β€” format valid / correct tool name / required arguments complete.

Language S1-3B (preliminary, n=4/lang) S2 base, before fine-tuning (held-out) S2-8B after fine-tuning (held-out) S2-8B unseen tools
Indonesian 25% / 25% / 25% 100% / 100% / 100% 100% / 100% / 100% (n=12) 100% / 100% / 100% (n=3)
Japanese 0% / 0% / 0% 100% / 100% / 100% 100% / 100% / 100% (n=12) 100% / 100% / 100% (n=3)
English 25% / 25% / 25% 100% / 100% / 100% 100% / 100% / 100% (n=12) 100% / 100% / 100% (n=3)

Held-out = test prompts never seen in training (hash-split), same tool schema family. Unseen tools = convert_currency, get_stock_price, never used in training. "S2 base, before fine-tuning" is the same checkpoint evaluated on the identical cases before training, so before/after is a controlled comparison. S1 numbers are not from an identical test set.

Coding (mini, executed unit tests): 6/6 before β†’ 6/6 after fine-tuning (passed; Python, 6 problems; includes one debugging task).

Not yet evaluated: HumanEval/MBPP-style public benchmarks, BFCL, long-context tasks, multi-turn agent loops with a real runtime.

Limitations

  • Evaluations are small; confidence intervals are wide.
  • Japanese and Indonesian agentic data is largely synthetic/template-based, so behavior on unusual phrasing may be weaker than in English.
  • Trained at 1024-token sequences; very long tool outputs may degrade quality.
  • May produce invalid or wrong arguments; always validate tool calls and sandbox execution (never run model-written code or commands unreviewed with real credentials).
  • Not safety-tuned beyond the base model.

License

Released under Apache-2.0, following the license reported for the base model (see base model card). Training data licenses vary (see table).

Citation

@misc{kanata_s2_8b_2026,
  title  = {Kanata S2-8B: Agentic & Coding Intelligence},
  author = {K-Ai (Kortex AI)},
  year   = {2026},
  url    = {https://huggingface.co/Keanualfahd/Kanata-S2-8B}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Keanualfahd/Kanata-S2-8B-LoRA

Finetuned
Qwen/Qwen3-8B
Finetuned
(2,416)
this model