Instructions to use penfever/grug-67b-a2b-sft-s2-thinking-step630 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use penfever/grug-67b-a2b-sft-s2-thinking-step630 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="penfever/grug-67b-a2b-sft-s2-thinking-step630") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("penfever/grug-67b-a2b-sft-s2-thinking-step630", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use penfever/grug-67b-a2b-sft-s2-thinking-step630 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "penfever/grug-67b-a2b-sft-s2-thinking-step630" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "penfever/grug-67b-a2b-sft-s2-thinking-step630", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/penfever/grug-67b-a2b-sft-s2-thinking-step630
- SGLang
How to use penfever/grug-67b-a2b-sft-s2-thinking-step630 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 "penfever/grug-67b-a2b-sft-s2-thinking-step630" \ --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": "penfever/grug-67b-a2b-sft-s2-thinking-step630", "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 "penfever/grug-67b-a2b-sft-s2-thinking-step630" \ --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": "penfever/grug-67b-a2b-sft-s2-thinking-step630", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use penfever/grug-67b-a2b-sft-s2-thinking-step630 with Docker Model Runner:
docker model run hf.co/penfever/grug-67b-a2b-sft-s2-thinking-step630
Grug 67B-A2B SFT (Stage 2, Nemotron Science Reasoning / thinking) - step 630
HF-BF16 (safetensors) export of the marin Grug 67B-A2B MoE model after
SFT Stage 2 (thinking). 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).
- Base: june-67b-a2b
step-42150(July 2T cooldown) -> SFT Stage 1 wildchat (penfever/grug-67b-a2b-sft-s1-wildchat-step257). - SFT Stage 2:
laion/llama-nemotron-science-reasoning-on-canonical-think-full(thinking-on, canonical<|start_think|>...<|end_think|>), 1 packed epoch = 630 steps, chained (weights-only init) from Stage 1's step-257 checkpoint, seq_len 32768, global batch 64, optimizer AdamH (fp32), cut cross-entropy (batched_xla). - Tokenizer:
marin-community/marin-tokenizer; chat templatedelphi_v0.jinja2.
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.
Companion s3 export: s3://marin-us-east-02a/marin/exports/grug/june-67b-a2b-sft-s2-thinking/step-630/hf-bf16-vllm/
- Downloads last month
- 2,086