Instructions to use laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired
- SGLang
How to use laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired 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 "laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired" \ --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": "laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired", "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 "laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired" \ --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": "laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired with Docker Model Runner:
docker model run hf.co/laion/grug-67b-a2b-sft-s3-agentic-step1903-repaired
Grug 67B-A2B SFT (Stage 3, AGENTIC opencode tool-calling) - step 1903
HF-BF16 (safetensors) export of the marin Grug 67B-A2B MoE model after SFT Stage 3
(agentic opencode tool-calling). Architecture GrugMoeForCausalLM (model_type: grug_moe);
serve with the marin vLLM fork (--enable-expert-parallel), not upstream vLLM.
- Total params: ~67B (A2B active MoE: 256 experts, 4 experts/token, 26 layers, hidden 2560, 20 heads / 5 KV heads).
- Lineage: june-67b-a2b cooldown
step-42150-> SFT Stage 1 wildchat (step-257) -> SFT Stage 2 thinking (penfever/grug-67b-a2b-sft-s2-thinking-step630) -> SFT Stage 3 agentic (this model), weights-only init (fresh optimizer, step 0) from the Stage-2 step-630 endpoint, 5 packed epochs over 32 opencode serve-parity SFT datasets = 1903 steps, seq_len 32768, global batch 64, optimizer AdamH, LR 5e-6. - Chat template: the OPENCODE tools-aware Qwen-style jinja the model was trained with
(
{% generation %}completions-only mask;<tools>system block; structured<tool_call>/"arguments";<tool_response>framing;<think>). Baked intotokenizer_config.json+chat_template.jinjaat export (NOT a generic template). - Tokenizer:
penfever/grug-67b-a2b-sft-s2-thinking-step630-tok(Llama-3 128256 vocab).
Export provenance
Exported from the native Levanter/Orbax checkpoint via marin's sanctioned
GrugModelConfig.hf_checkpoint_converter().with_config_overrides({"dtype":"bfloat16"}) path
(experiments/grug/moe/model.py), reproducing tests/vllm/e2e/test_june_67b_a2b_hf_bf16_export.py.
pending_qb_betas is baked into the router bias before export (required for correct logits).
All tensors BF16. Training chat template preserved explicitly on export (marin #7406).
Companion s3 export: s3://marin-us-east-02a/marin/exports/grug/june-67b-a2b-sft-s3-agentic/step-1903/hf-bf16-vllm/
- Downloads last month
- 89