mtrajan commited on
Commit
ee58452
·
verified ·
1 Parent(s): 898945f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +36 -15
README.md CHANGED
@@ -30,6 +30,16 @@ GGUF quantizations of [sarvamai/sarvam-30b](https://huggingface.co/sarvamai/sarv
30
 
31
  Created by applying [llama.cpp PR #20275](https://github.com/ggml-org/llama.cpp/pull/20275) which adds `sarvam_moe` architecture support to the converter and runtime.
32
 
 
 
 
 
 
 
 
 
 
 
33
  ## Files
34
 
35
  | File | Quant | Size | BPW | Notes |
@@ -39,9 +49,7 @@ Created by applying [llama.cpp PR #20275](https://github.com/ggml-org/llama.cpp/
39
 
40
  ## How to use
41
 
42
- > **Note:** These GGUFs require a patched llama.cpp until [PR #20275](https://github.com/ggml-org/llama.cpp/pull/20275) is merged into mainline.
43
-
44
- ### Quick start (patches llama.cpp automatically)
45
 
46
  ```bash
47
  git clone https://github.com/mtr7x/sarvam-gguf.git
@@ -50,7 +58,9 @@ chmod +x patch_and_convert.sh
50
  ./patch_and_convert.sh
51
  ```
52
 
53
- ### Manual (if you already have patched llama.cpp)
 
 
54
 
55
  ```bash
56
  ./llama-cli \
@@ -59,9 +69,19 @@ chmod +x patch_and_convert.sh
59
  --ctx-size 2048 \
60
  --temp 0.7 \
61
  -no-cnv \
62
- --prompt भारत के बारे में बताइए।
63
  ```
64
 
 
 
 
 
 
 
 
 
 
 
65
  ## Architecture
66
 
67
  ```
@@ -77,27 +97,28 @@ sarvamai/sarvam-30b
77
 
78
  ## Why this is needed
79
 
80
- Sarvam open-sourced 30B and 105B under Apache 2.0, but mainline llama.cpp doesn't recognize `model_type: sarvam_moe` — the converter exits immediately. Contrary to what you might expect, **sigmoid routing is already supported** in llama.cpp (used by GLM4 and others). The actual blocker is a missing class registration + tensor mappings + C++ graph builder — all provided by PR #20275.
81
 
82
  ## The domino chain
83
 
84
  ```
85
  PR #20275 merges into llama.cpp ← pending
86
- → GGUF can be created ← this repo
87
- → Ollama updates its llama.cpp
88
- → Unsloth applies dynamic quants (protects Indic embedding layers)
89
- → ollama run sarvam-30b
90
  ```
91
 
92
  ## Runtime support
93
 
94
  | Runtime | Status |
95
  |---------|--------|
96
- | vLLM | PR #33942 merged |
97
- | SGLang | Works |
98
- | llama.cpp | PR #20275 pending |
99
- | Ollama | Blocked on llama.cpp |
100
- | GGUF | **This repo** |
 
101
 
102
  ## Credits
103
 
 
30
 
31
  Created by applying [llama.cpp PR #20275](https://github.com/ggml-org/llama.cpp/pull/20275) which adds `sarvam_moe` architecture support to the converter and runtime.
32
 
33
+ > **Will this work with Ollama / LM Studio / Jan?**
34
+ >
35
+ > **Not yet.** These tools bundle mainline llama.cpp, which does not recognize `sarvam_moe`. You will see:
36
+ > ```
37
+ > error loading model: unknown model architecture: 'sarvam_moe'
38
+ > ```
39
+ > This GGUF **requires a patched llama.cpp** (with PR #20275 applied) until that PR merges into mainline. Once it does, Ollama / LM Studio / Jan will work automatically on their next update.
40
+ >
41
+ > To build a patched llama.cpp, use [mtr7x/sarvam-gguf](https://github.com/mtr7x/sarvam-gguf).
42
+
43
  ## Files
44
 
45
  | File | Quant | Size | BPW | Notes |
 
49
 
50
  ## How to use
51
 
52
+ ### Option 1: Patch llama.cpp automatically (recommended)
 
 
53
 
54
  ```bash
55
  git clone https://github.com/mtr7x/sarvam-gguf.git
 
58
  ./patch_and_convert.sh
59
  ```
60
 
61
+ This clones llama.cpp, applies PR #20275, builds it, and you're ready to run.
62
+
63
+ ### Option 2: Run with patched llama.cpp directly
64
 
65
  ```bash
66
  ./llama-cli \
 
69
  --ctx-size 2048 \
70
  --temp 0.7 \
71
  -no-cnv \
72
+ --prompt "भारत के बारे में बताइए।"
73
  ```
74
 
75
+ ### What does NOT work (yet)
76
+
77
+ | Tool | Status | Why |
78
+ |------|--------|-----|
79
+ | Ollama | `unknown model architecture` | Waiting on PR #20275 merge |
80
+ | LM Studio | `unknown model architecture` | Waiting on PR #20275 merge |
81
+ | Jan | `unknown model architecture` | Waiting on PR #20275 merge |
82
+ | llama.cpp (mainline) | `unknown model architecture` | PR #20275 not yet merged |
83
+ | llama.cpp (patched) | Works | This is what you need |
84
+
85
  ## Architecture
86
 
87
  ```
 
97
 
98
  ## Why this is needed
99
 
100
+ Sarvam open-sourced 30B and 105B under Apache 2.0, but mainline llama.cpp doesn't recognize `model_type: "sarvam_moe"` — the converter exits immediately. Contrary to what you might expect, **sigmoid routing is already supported** in llama.cpp (used by GLM4 and others). The actual blocker is a missing class registration + tensor mappings + C++ graph builder — all provided by PR #20275 (387 lines).
101
 
102
  ## The domino chain
103
 
104
  ```
105
  PR #20275 merges into llama.cpp ← pending
106
+ → GGUF can be created ← done (this repo)
107
+ → Ollama updates its llama.cpp ← blocked
108
+ → Unsloth applies dynamic quants blocked
109
+ → ollama run sarvam-30b ← blocked
110
  ```
111
 
112
  ## Runtime support
113
 
114
  | Runtime | Status |
115
  |---------|--------|
116
+ | vLLM | PR #33942 merged |
117
+ | SGLang | Works |
118
+ | llama.cpp (patched) | Works (PR #20275) |
119
+ | llama.cpp (mainline) | Blocked PR pending |
120
+ | Ollama | Blocked on llama.cpp |
121
+ | LM Studio | Blocked on llama.cpp |
122
 
123
  ## Credits
124