Instructions to use MainStack/marvy-2-35B-MoE-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use MainStack/marvy-2-35B-MoE-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MainStack/marvy-2-35B-MoE-GGUF", filename="marvy-2-35B-MoE-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MainStack/marvy-2-35B-MoE-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Use Docker
docker model run hf.co/MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use MainStack/marvy-2-35B-MoE-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MainStack/marvy-2-35B-MoE-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MainStack/marvy-2-35B-MoE-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
- Ollama
How to use MainStack/marvy-2-35B-MoE-GGUF with Ollama:
ollama run hf.co/MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
- Unsloth Studio
How to use MainStack/marvy-2-35B-MoE-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MainStack/marvy-2-35B-MoE-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MainStack/marvy-2-35B-MoE-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MainStack/marvy-2-35B-MoE-GGUF to start chatting
- Pi
How to use MainStack/marvy-2-35B-MoE-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use MainStack/marvy-2-35B-MoE-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use MainStack/marvy-2-35B-MoE-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use MainStack/marvy-2-35B-MoE-GGUF with Docker Model Runner:
docker model run hf.co/MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
- Lemonade
How to use MainStack/marvy-2-35B-MoE-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.marvy-2-35B-MoE-GGUF-Q4_K_M
List all available models
lemonade list
marvy-2-35B-MoE-GGUF
GGUF quants of marvy-2, a 35B-A3B Mixture-of-Experts model fine-tuned for the ServiceNow delivery lifecycle. ~3B active parameters per token; runs on a single consumer GPU or fast Apple Silicon thanks to the MoE sparsity.
GGUF quantizations for use with llama.cpp, Ollama, LM Studio, and compatible runtimes.
Released under Apache-2.0. Built with Qwen3.5 (Apache-2.0) via
unsloth/Qwen3.6-35B-A3Band the Opus-distilledstamsam/...MTPbase.
Files
| File | Quant | Size | Use when |
|---|---|---|---|
marvy-2-35B-MoE-Q4_K_M.gguf |
Q4_K_M | ~20 GB | Default — best size/quality balance |
marvy-2-35B-MoE-Q8_0.gguf |
Q8_0 | ~34 GB | Near-FP16 quality, more headroom |
Architecture notes
This is a hybrid SSM + MoE Transformer:
- 40 layers, mixed SSM (Mamba-style) and grouped-query attention blocks
- 256 routed experts per MoE layer, 3B active per token (A3B)
- Shared expert per layer for common pathways
qwen3_5_moearchitecture in llama.cpp; needs a recent build (see "Supported runtimes" below)
The Multi-Token Prediction (MTP) head present in the base model was not included in this GGUF — these quants are text-only causal LM. The base model's MoE expert weights and SSM blocks are preserved.
Quick start
Ollama
ollama run hf.co/MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
llama.cpp
llama-cli -hf MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M \
-p "Write a ServiceNow user story with acceptance criteria for P1 SLA escalation." \
--temp 0.4 \
-c 4096
LM Studio
Search the model catalog for marvy-2-35B-MoE-GGUF and download, or load
the local .gguf file via "Open Model in Folder". LM Studio's OpenAI-compatible
server is at http://localhost:1234/v1 by default.
Supported runtimes
The qwen3_5_moe architecture (with mixed SSM layers and Multi-Token
Prediction in the base) is new. Verify your runtime supports it:
- llama.cpp: master branch as of mid-2026 (commits containing
Qwen3_5MoeForConditionalGenerationregistration inconversion/qwen.py). The Homebrew formula may lag — clone upstream if you hit "unknown architecture" errors. - Ollama: ships its own llama.cpp; check that your Ollama version is recent.
- LM Studio: uses its own bundled runtime; recent versions support Qwen3.5 MoE.
Trained on
- v1 corpus: ServiceNow delivery lifecycle artifacts (SOW, SDD, stories, acceptance criteria, value hypothesis, ...) — same data marvy-1 used.
- v2 corpus: extended to capability-to-epic mapping, mermaid diagram
authoring, deployment package modeling, stakeholder mapping, story-to-UAT,
and more. See
EVAL.mdin the repo root for per-task perplexity.
How this GGUF was built
LoRA adapter (rank 32, 350 steps, attention-only Q/K/V/O)
+
bf16 base (unsloth/Qwen3.6-35B-A3B)
│ mlx_lm fuse
merged-bf16/ (14 shards, 65 GB safetensors with mlx_lm switch_mlp naming)
│ scripts/marvy-v2-rename-moe-tensors.py (bridge to HF-canonical names)
merged-bf16-hf/ (15 shards, 65 GB; switch_mlp → experts.gate_up_proj packed)
│ llama.cpp/convert_hf_to_gguf.py --no-mtp --outtype f16
marvy-2-35B-MoE-F16.gguf (65 GB, 733 tensors)
│ llama-quantize
marvy-2-35B-MoE-Q4_K_M.gguf (20 GB, 4.6 BPW)
marvy-2-35B-MoE-Q8_0.gguf (34 GB, 8.52 BPW)
End-to-end build script: scripts/marvy-v2-35B-MoE-build-gguf.sh (in the
source repo). The switch_mlp → experts rename is necessary because mlx_lm
fuse and llama.cpp's converter use different naming conventions for routed
MoE tensors.
License
Apache-2.0 (inherits from Qwen). See LICENSE and NOTICE in the repo root.
Citation
@misc{marvy-2-35B-MoE,
title = {marvy-2: A ServiceNow delivery-lifecycle MoE LLM},
author = {MainStack},
year = {2026},
howpublished = {\url{https://huggingface.co/MainStack/marvy-2-35B-MoE-GGUF}}
}
- Downloads last month
- 111
4-bit
8-bit
Model tree for MainStack/marvy-2-35B-MoE-GGUF
Base model
Qwen/Qwen3.6-35B-A3B