You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: document Python deps for SafeTensors to GGUF conversion
Add required packages (torch, safetensors, gguf, transformers) and
optional model-specific imports in internal/convert/data/README.md.
Summarize the same install step in the root README under Model Formats.
Made-with: Cursor
Copy file name to clipboardExpand all lines: README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,6 +214,14 @@ csghub-lite config set server_url https://my-private-csghub.example.com
214
214
| GGUF | Yes | Yes (via llama.cpp) |
215
215
| SafeTensors | Yes | Yes (auto-converted to GGUF) |
216
216
217
+
SafeTensors checkpoints are converted once using the bundled llama.cpp `convert_hf_to_gguf.py` and **system Python** (PyTorch is not shipped inside the release binary). Install these packages once:
218
+
219
+
```bash
220
+
pip3 install torch safetensors gguf transformers
221
+
```
222
+
223
+
Use Python 3.10+ on `PATH` (Windows: `python` or `python3`). Some models may need extra packages (for example `sentencepiece`); see [`internal/convert/data/README.md`](internal/convert/data/README.md) for the full list and troubleshooting (`gguf` version mismatch, optional `CSGHUB_LITE_CONVERTER_URL`).
Copy file name to clipboardExpand all lines: internal/convert/data/README.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,3 +20,33 @@ This file is embedded into the `csghub-lite` binary (`go:embed`) so SafeTensors
20
20
3. Update **`BundledConverterLLamacppRef`** and the table above.
21
21
22
22
Optional: set **`CSGHUB_LITE_CONVERTER_URL`** at runtime to a raw mirror URL instead of using the embedded file.
23
+
24
+
## Python runtime dependencies
25
+
26
+
`csghub-lite` materializes this script and runs it with a system **Python 3** interpreter. The binary pre-checks imports before conversion (`internal/convert/convert_python.go`); all of the following must be importable:
27
+
28
+
| Package | Role |
29
+
|---------|------|
30
+
|`torch`| Load tensors / weights |
31
+
|`safetensors`| Read `.safetensors` checkpoints |
32
+
|`gguf`| Write GGUF; if the script fails with `AttributeError` involving `MODEL_ARCH` or `gguf`, upgrade: `pip3 install -U gguf`|
33
+
|`transformers`|`AutoConfig`, tokenizers, etc. |
34
+
35
+
One-time install (same as the CLI error text):
36
+
37
+
```bash
38
+
pip3 install torch safetensors gguf transformers
39
+
```
40
+
41
+
On macOS/Linux the tool tries `python3.13` … `python3.10`, then `python3` / `python`, plus common Homebrew paths. On Windows it looks for `python` / `python3` on `PATH`.
42
+
43
+
### Optional / model-specific imports
44
+
45
+
The upstream script may import extra packages for certain architectures. These are **not** verified up front; install if conversion fails with `ModuleNotFoundError`:
46
+
47
+
| Package | When needed |
48
+
|---------|----------------|
49
+
|`numpy`| Used by the script; usually already installed with `torch`|
50
+
|`sentencepiece`| Some SentencePiece-based tokenizers |
51
+
|`huggingface_hub`| e.g. `snapshot_download` paths in the converter |
52
+
|`mistral_common`| Some Mistral flows; upstream suggests `pip install mistral-common[image,audio]`|
0 commit comments