tracegenix-mini-sft-clean-3ep

A small Qwen3.5-MoE checkpoint (~0.87 B total / ~0.69 B active) supervised fine-tuned on kshitijthakkar/TraceVerse-RL-SFT-Clean for OpenTelemetry trace analysis: cost, latency, error, security, and GPU/CO₂ summarisation over gen_ai.* semantic-convention spans produced by genai-otel-instrument.

Part of the TraceVerse-RL lineage — the SFT step that precedes GRPO + LoRA-soup merging.

At a glance

Architecture Qwen3.5-MoE, 12 layers, hybrid attention (linear × 3 + full × 1, repeated)
Total params 870 M
Active params 687 M
Hidden / head_dim 1024 / 256
Experts (routed / shared / per-tok) 16 / 1 / 2
MoE intermediate 400
Vocab 248 320 (Qwen3.5 BPE)
Context 1 048 576 (yarn-extended; sliding window 32)
Precision bf16
Base Qwen/Qwen3.5-0.8B-Base
Training 3 epochs SFT, LR 2.5 e-5 cosine, packing, adamw_8bit on H100
Training data kshitijthakkar/TraceVerse-RL-SFT-Clean (14.9 K rows)

Intended use

The model is domain-specialised. It expects:

  1. The tracegenix system message (or any close variant — see chat template), and
  2. A structured OpenTelemetry span / trace payload (or an analytical question referencing one).

Typical tasks: trace classification (12-category taxonomy), cost / latency analysis, multi-section trace reports, RCA hypothesis building, agent quality scoring. Not designed for general-purpose chat or retrieval-augmented Q&A outside the trace-analysis domain.

How to use

With Ollama (recommended for local use)

⚠️ Important: the Python-Jinja chat template embedded in the GGUF uses macros, raise_exception, and enable_thinking branches that llama.cpp's Jinja parser cannot handle. Ollama silently falls back to a bare {{ .Prompt }} template, stripping the <|im_start|> / <|im_end|> role markers — so /api/chat produces hallucinated garbage by default.

Fix: override the template in the Modelfile with a proper ChatML Go-template. Use Modelfile.q4 from this repo (or copy the snippet below).

FROM ./tracegenix-mini-sft-clean-3ep-Q4_K_M.gguf

SYSTEM """You are tracegenix, TraceVerse's autonomous AI SRE for production AI agents. Open new conversations with 'Namaste 🙏'. Investigate OpenTelemetry signals and traces to identify root causes, propose remediations, and proactively surface context the user might miss. Use available MCP tools for live data; cite sources from trace evidence; never fabricate. Respond with structured JSON when a schema is clearly implied by the prompt; concise prose otherwise. Match the user's language (English, Hindi, Hinglish, or other Indian languages). You are a teammate, not a chatbot."""

TEMPLATE """{{- if .Messages }}
{{- if or .System .Tools }}<|im_start|>system
{{- if .System }}
{{ .System }}
{{- end }}
{{- if .Tools }}

# Tools

You may call one or more functions. Each call must be wrapped in <tool_call>...</tool_call> XML tags with a JSON object inside.

<tools>
{{- range .Tools }}
{{ . }}
{{- end }}
</tools>
{{- end }}<|im_end|>
{{ end }}
{{- range $i, $_ := .Messages }}
{{- if eq .Role "user" }}<|im_start|>user
{{ .Content }}<|im_end|>
{{ else if eq .Role "assistant" }}<|im_start|>assistant
{{ .Content }}{{- if not (eq (len (slice $.Messages $i)) 1) }}<|im_end|>
{{ end }}
{{- else if eq .Role "tool" }}<|im_start|>user
<tool_response>
{{ .Content }}
</tool_response><|im_end|>
{{ end }}
{{- end }}<|im_start|>assistant
{{ else }}{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
{{ end }}{{ .Response }}{{- if .Response }}<|im_end|>{{ end }}"""

PARAMETER temperature 1.0
PARAMETER top_p 0.95
PARAMETER top_k 20
PARAMETER num_ctx 8192
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
ollama create tracegenix-mini-q4 -f Modelfile.q4
ollama run tracegenix-mini-q4

With this template both /api/chat and the chat UI produce correct output — e.g. for the orchestration_planner task, the model emits a clean JSON tool plan that matches the training distribution.

With llama-server

./llama-server -m tracegenix-mini-sft-clean-3ep-Q4_K_M.gguf -ngl 99 -c 8192 -fa on

With transformers (bf16 safetensors)

from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("kshitijthakkar/tracegenix-mini-sft-clean-3ep")
model = AutoModelForCausalLM.from_pretrained(
    "kshitijthakkar/tracegenix-mini-sft-clean-3ep",
    dtype="bfloat16",
    device_map="auto",
    trust_remote_code=True,
)

GGUF quantizations

Converted with llama.cpp commit 67b2b7f (May 2026) via convert_hf_to_gguf.py --outtype bf16, then llama-quantize. Architecture handler: Qwen3_5MoeTextModel (registered for Qwen3_5MoeForConditionalGeneration / Qwen3_5MoeForCausalLM).

File Size Use for Notes
tracegenix-mini-sft-clean-3ep-bf16.gguf 1.9 GB accuracy reference Same precision the model was trained at; ~120 tok/s on a 6 GB consumer GPU via Ollama chat (with the Modelfile template override below)
tracegenix-mini-sft-clean-3ep-Q6_K.gguf 929 MB best quality / size trade Near-lossless vs bf16 for K-quant kernels
tracegenix-mini-sft-clean-3ep-Q4_K_M.gguf 796 MB default Smallest, fastest; loaded in Ollama as tracegenix-mini-q4

Why no Q8_0

llama.cpp's Q8_0 requires every quantized tensor's column dimension to be divisible by 32. This model's MoE expert FFN tensors have ncols = 400 (moe_intermediate_size = 400, not a power of two), and 400 % 32 != 0. There is no fallback path defined for Q8_0 in this case, so the conversion errors out:

warning: blk.0.ffn_down_exps.weight - ncols 400 not divisible by 32 (required for type q8_0)
llama_model_quantize: failed to quantize: no tensor type fallback is defined for type q8_0

K-quants (Q4_K_M, Q6_K) use a 256-element super-block layout that handles 400 fine, hence they succeed. Q6_K is the practical substitute — its perplexity gap vs Q8_0 on Llama-3-8B reference is roughly +0.02 (negligible).

Measured throughput (RTX 3060 6 GB, num_ctx=8192, Ollama /api/chat with the Modelfile template override)

Measured on the orchestration_planner task (~1.7 KB system + short user query, ~190-token JSON output, temperature=0.0).

Quant Eval rate First-token latency Notes
Q4_K_M 160 tok/s ~0.4 s (warm) Recommended for interactive use
bf16 118 tok/s ~5 s (warm) Same precision as the original safetensors; output literally matches ground truth

(Q6_K not benchmarked here; expected to fall between the two, closer to Q4_K_M. Numbers were obtained via /api/chat with the Go-template override — without that override Ollama strips role markers and decoding degenerates to < 1 tok/s, which is a chat-template issue, not a property of the weights.)

Evaluation

Judged by lightning-ai/gpt-oss-120b on 212 examples from TraceVerse-RL-Eval-Golden across 4 dimensions (1–10 scale). Detailed per-sample completions and scores are in TraceVerse-RL-Eval-Inference.

(Per-environment table is below in the auto-maintained benchmark block.)

Limitations

  • Domain-specialised. Best on structured trace-analysis prompts. Casual chat works but is not the trained distribution.
  • GGUF-embedded chat template does not work in Ollama — llama.cpp's Jinja parser cannot handle the source chat_template.jinja (macros, raise_exception, enable_thinking branches), so Ollama falls back to a bare {{ .Prompt }} template and /api/chat produces hallucinated output. Always use the Modelfile TEMPLATE override shown in the Ollama section above; with it the model emits correct training-distribution outputs (verified on the orchestration_planner task — output matches ground truth).
  • MTP heads not exported. Qwen3.5-MoE's multi-token-prediction layers were dropped during the source SFT; the GGUFs ship the main LM head only. Ollama / llama.cpp mainline do not consume MTP at inference, so this is irrelevant for typical usage. (Speculative-decoding-aware runtimes such as am17an/llama.cpp:mtp-clean would benefit if MTP were restored.)
  • Hallucination on out-of-domain technical questions is consistent with a small specialised model — verify generated factual claims independently.

Measuring throughput

The Ollama chat UI does not display tokens/s. To measure:

# CLI verbose mode
ollama run tracegenix-mini --verbose "your prompt"

# Via the API
curl -s http://localhost:11434/api/chat -d '{
  "model":"tracegenix-mini",
  "messages":[{"role":"user","content":"..."}],
  "stream":false
}' | jq '{eval_count, tokens_per_s: (.eval_count / (.eval_duration / 1e9))}'

# Or tail the server log
tail -f ~/.ollama/logs/server.log

Citation

@misc{tracegenix-mini-sft-clean-3ep,
  author = {Kshitij Thakkar},
  title  = {tracegenix-mini-sft-clean-3ep: a small Qwen3.5-MoE for OpenTelemetry trace analysis},
  year   = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/kshitijthakkar/tracegenix-mini-sft-clean-3ep}}
}

Benchmark Results — TraceVerse-RL-Eval-Golden

Judged by lightning-ai/gpt-oss-120b on 212 examples across 4 dimensions (1-10 scale).

Overall Accuracy Completeness Format Grounding
4.25 3.86 4.29 5.23 4.11

Per-environment

Environment N Overall
orchestration_planner 23 7.89
cloud_incident_response 2 5.35
incident_ops 2 4.85
soc_triage_gym 3 4.47
tool_orchestrator 43 4.35
trace_classifier 60 3.89
report_generator 33 3.45
agent_scorer 30 3.38
deep_investigator 9 3.19
quality_evaluator 7 2.99

See full per-sample scores at kshitijthakkar/TraceVerse-RL-Eval-Inference.

Downloads last month
507
Safetensors
Model size
1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for kshitijthakkar/tracegenix-mini-sft-clean-3ep

Quantized
(29)
this model

Space using kshitijthakkar/tracegenix-mini-sft-clean-3ep 1