Text Generation
GGUF
English
servicenow
itsm
csdm
delivery
llama.cpp
ollama
lm-studio
quantized
qwen3.5
Mixture of Experts
mixture-of-experts
conversational
Instructions to use MainStack/marvy-2-35B-MoE-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- 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
File size: 4,368 Bytes
30f0dd3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | ---
license: apache-2.0
base_model: stamsam/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled-MLX-oQ4-MTP
base_model_relation: quantized
pipeline_tag: text-generation
language:
- en
tags:
- servicenow
- itsm
- csdm
- delivery
- gguf
- llama.cpp
- ollama
- lm-studio
- quantized
- qwen3.5
- moe
- mixture-of-experts
---
# 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](https://github.com/ggml-org/llama.cpp),
[Ollama](https://ollama.com), [LM Studio](https://lmstudio.ai), and compatible
runtimes.
> Released under **Apache-2.0**. Built with Qwen3.5 (Apache-2.0) via
> `unsloth/Qwen3.6-35B-A3B` and the Opus-distilled `stamsam/...MTP` base.
## 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_moe` architecture 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
```bash
ollama run hf.co/MainStack/marvy-2-35B-MoE-GGUF:Q4_K_M
```
### llama.cpp
```bash
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_5MoeForConditionalGeneration` registration in `conversion/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.md` in 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
```bibtex
@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}}
}
```
|