gravity-sft-v7-agentic

Agentic SFT model trained on trillionlabs/cyan-agentic-v7. Optimized for tool-calling and terminal-style agent trajectories in three complementary formats (structured tool_calls, JSON-list, BFCL Python-syntax) with loop-recovery signal from openagent v1 augmentations.

Model summary

  • Architecture: DeepseekV3-style MoE (52 layers, 64 experts, top-8, 1 shared expert, 2 dense layers).
  • Params: ~29.5B total, ~5.3B active per token.
  • Context: 131,072 tokens (RoPE θ = 1e6).
  • Tokenizer: GLM-151k SFT.
  • Precision: bfloat16.

Training

  • Dataset: trillionlabs/cyan-agentic-v7 — 420,936 rows, mixture of xlam, nemotron (both in raw tool_calls and BFCL Python-syntax variants), envgen_v2 (TerminalBench + OfficeBench), openagent-v1 loop-recovery augmentations, and endless-terminal SFT.
  • Init: llama_pro_cyan_renew_lc/0000000600 (clean base checkpoint).
  • Epochs: 3 (step 1224 = end of epoch 3, uploaded here).
  • Optimizer: Muon, lr 2e-5, cosine schedule with 50-step warmup, min ratio 0.1, grad clip 1.0.
  • Global batch: 4.19M tokens/step (dp_shard=16, batch_size=2, seq_len=131072).
  • Hardware: 2× nodes with 8× B200 (16 GPUs), FSDP + activation checkpointing.
  • Per-turn loss masking: bad turns (looped_stuck, mistake_later_fixed, redundant_step, hallucination) are masked out of the loss via the chat template's {% generation %} markers.

Supported call formats

The model is trained to answer in three formats depending on the system prompt it receives:

  1. Structured tool_calls — standard OpenAI-style role=assistant / tool_calls with paired role=tool observation messages.

  2. JSON-list content — assistant emits [{"name": "fn", "arguments": {...}}] in the content field; observations come back as user turns containing a stringified list-of-dicts.

  3. BFCL Python-syntax — assistant emits [fn_name(arg=val, ...)] and nothing else; observations come back as user turns of the form [{'role': 'tool', 'name': "fn(arg='val')", 'content': "..."}, ...].

The dataset card at trillionlabs/cyan-agentic-v7 documents the format matrix per source.

Usage

sglang

python -m sglang.launch_server \
  --model-path trillionlabs/gravity-sft-v7-agentic \
  --tp 8 \
  --dtype bfloat16 \
  --moe-runner-backend triton \
  --context-length 131072 \
  --host 0.0.0.0 --port 8080

transformers

from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("trillionlabs/gravity-sft-v7-agentic")
model = AutoModelForCausalLM.from_pretrained(
    "trillionlabs/gravity-sft-v7-agentic",
    torch_dtype="bfloat16",
    device_map="auto",
)

Note: the exported config.json includes moe_layer_freq: 1 so the model loads under sglang's DeepseekV3 config path without patches.

Related

License

Apache 2.0.

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