Image-Text-to-Text
Transformers
Safetensors
Trellis
glm5_next
glm
glm-5
tr3
mcg
quantized
8-bit precision
Mixture of Experts
reasoning
text-generation
fidelity
kl-divergence
exllamav3
fidelity-provenance
conversational
Eval Results (legacy)
exl3
Instructions to use malaiwah/GLM-5.3-Flash-TR3-8bpw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use malaiwah/GLM-5.3-Flash-TR3-8bpw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="malaiwah/GLM-5.3-Flash-TR3-8bpw") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("malaiwah/GLM-5.3-Flash-TR3-8bpw") model = AutoModelForMultimodalLM.from_pretrained("malaiwah/GLM-5.3-Flash-TR3-8bpw", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Trellis
How to use malaiwah/GLM-5.3-Flash-TR3-8bpw with Trellis:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use malaiwah/GLM-5.3-Flash-TR3-8bpw with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "malaiwah/GLM-5.3-Flash-TR3-8bpw" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "malaiwah/GLM-5.3-Flash-TR3-8bpw", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/malaiwah/GLM-5.3-Flash-TR3-8bpw
- SGLang
How to use malaiwah/GLM-5.3-Flash-TR3-8bpw 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 "malaiwah/GLM-5.3-Flash-TR3-8bpw" \ --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": "malaiwah/GLM-5.3-Flash-TR3-8bpw", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "malaiwah/GLM-5.3-Flash-TR3-8bpw" \ --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": "malaiwah/GLM-5.3-Flash-TR3-8bpw", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use malaiwah/GLM-5.3-Flash-TR3-8bpw with Docker Model Runner:
docker model run hf.co/malaiwah/GLM-5.3-Flash-TR3-8bpw
SEALED: 0.012384191 over the full panel, two bitwise-identical cold runs
Browse files- README.md +33 -34
- receipts/stream-k8-kld.json +26 -0
README.md
CHANGED
|
@@ -31,43 +31,42 @@ MTP layer quantized at K8 (128-word trellis, MCG `0xCBAC1FED`); everything else
|
|
| 31 |
embeddings, lm_head) **bit-exact native BF16**. 331.4 GB — within 1% of the
|
| 32 |
official FP8 release's footprint, at 1.66× lower divergence.
|
| 33 |
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
| 42 |
-
|
|
| 43 |
-
|
|
| 44 |
-
| [K6
|
| 45 |
-
|
|
| 46 |
-
|
|
| 47 |
-
|
|
| 48 |
-
|
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
mind.
|
| 64 |
|
| 65 |
**Methodology note worth stealing.** A single-window comparison of these two
|
| 66 |
rates is *statistically meaningless*: per-window KLD scatter has sd 1.73e-3
|
| 67 |
-
against a K6-vs-K8 effect of 1.22e-3. On one unlucky window (`window-0000`)
|
| 68 |
-
appeared *worse* than K6; over the full panel it wins decisively. Never
|
| 69 |
-
single-window KLD as a rate comparison —
|
| 70 |
-
[
|
| 71 |
|
| 72 |
## What this is (and is not)
|
| 73 |
|
|
|
|
| 31 |
embeddings, lm_head) **bit-exact native BF16**. 331.4 GB — within 1% of the
|
| 32 |
official FP8 release's footprint, at 1.66× lower divergence.
|
| 33 |
|
| 34 |
+
## Quality — SEALED, full panel, two bitwise-identical cold runs
|
| 35 |
+
|
| 36 |
+
**Mean KLD(teacher ‖ K8) = 0.012384191023436866** over the full sealed panel
|
| 37 |
+
(25 windows / 51,175 positions), **two cold runs producing identical means to
|
| 38 |
+
the last digit** (`bitwise_deterministic: true`). Quality gate passed.
|
| 39 |
+
Receipt: [`receipts/stream-k8-kld.json`](receipts/stream-k8-kld.json).
|
| 40 |
+
|
| 41 |
+
| Model | Mean KLD (nats) | Size | Lane |
|
| 42 |
+
|---|---:|---:|---|
|
| 43 |
+
| **This K8** | **0.012384** | 331 GB | streaming, 2 runs |
|
| 44 |
+
| [K6](https://huggingface.co/malaiwah/GLM-5.3-Flash-TR3-6bpw) | 0.013715 | 254 GB | streaming, 2 runs |
|
| 45 |
+
| K6 (sealed 8×H200, 5 runs) | 0.013723 | 254 GB | sealed EP8 |
|
| 46 |
+
| Official FP8 | 0.020615 | 328 GB | cross-stack |
|
| 47 |
+
| brandonmusic 4bpw | 0.024555 | 176 GB | his stack |
|
| 48 |
+
| 0xSero Dione Q4 | 0.027263 | 188 GB | [our measurement](https://huggingface.co/datasets/malaiwah/GLM-5.3-Flash-fidelity-suite-v1/blob/main/reports/dione-q4-packed-kld.json) |
|
| 49 |
+
| NVFP4 | 0.060535 | ~180 GB | his stack, 1 window |
|
| 50 |
+
|
| 51 |
+
**At the same footprint as the official FP8 release (331 vs 328 GB), K8 is
|
| 52 |
+
1.66× closer to the BF16 teacher** — and 1.11× closer than K6 at 30 % more
|
| 53 |
+
bytes. Weight-space corroboration: with the intermediate-channel permutation
|
| 54 |
+
undone, K8's shipped store is **13.2× tighter in NMSE** than K6's (3.505e-5 vs
|
| 55 |
+
4.624e-4, better in 30 of 30 sampled matrices).
|
| 56 |
+
|
| 57 |
+
**Lane disclosure.** Measured on the single-GPU *streaming* lane (~$6/model),
|
| 58 |
+
not the 8×H200 sealed lane. The lanes were bridged on this exact panel: K6
|
| 59 |
+
reads 0.013714889 streaming vs 0.013723385 sealed — **−8.5e-6 (0.06 %)**, with
|
| 60 |
+
the worst single window differing by 2.9e-4. The streaming receipt sets
|
| 61 |
+
`publishable_as_reproduction: false` because a different expert-combine order
|
| 62 |
+
is an independent measurement that agrees closely, not a bitwise reproduction.
|
|
|
|
| 63 |
|
| 64 |
**Methodology note worth stealing.** A single-window comparison of these two
|
| 65 |
rates is *statistically meaningless*: per-window KLD scatter has sd 1.73e-3
|
| 66 |
+
against a K6-vs-K8 effect of 1.22e-3. On one unlucky window (`window-0000`)
|
| 67 |
+
K8 appeared *worse* than K6; over the full panel it wins decisively. Never
|
| 68 |
+
quote a single-window KLD as a rate comparison —
|
| 69 |
+
[full write-up](https://github.com/malaiwah/glm53-flash-fidelity-suite/blob/main/k6/K8-ANOMALY.md).
|
| 70 |
|
| 71 |
## What this is (and is not)
|
| 72 |
|
receipts/stream-k8-kld.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bitwise_deterministic": true,
|
| 3 |
+
"cold_run_count": 2,
|
| 4 |
+
"cold_run_deviation": "2 cold runs, not 5 (budget; disclosed)",
|
| 5 |
+
"distinct_tokenwise_kld_sha256": [
|
| 6 |
+
"763bc4a56a371e11a0f96469885b920deb6acb2c7c576d1268fb0907577f0942"
|
| 7 |
+
],
|
| 8 |
+
"kld_report_sha256": [
|
| 9 |
+
"965566f1d62e75051612045ff88424e50c46a6d1abfecfb92b04af78e8bf3798",
|
| 10 |
+
"d223567460e4c22cccc432b082cf74bfbc7339628b13db823fd0e0590f2f20bb"
|
| 11 |
+
],
|
| 12 |
+
"measured_mean_kld": 0.012384191023436866,
|
| 13 |
+
"profile": "k8-tp4",
|
| 14 |
+
"quality_gate": {
|
| 15 |
+
"metric": "mean_tokenwise_kld",
|
| 16 |
+
"threshold_lt": 0.06
|
| 17 |
+
},
|
| 18 |
+
"quality_gate_passed": true,
|
| 19 |
+
"run_means": [
|
| 20 |
+
0.012384191023436866,
|
| 21 |
+
0.012384191023436866
|
| 22 |
+
],
|
| 23 |
+
"schema": "malaiwah.glm53-k8-packed-kld-summary.v1",
|
| 24 |
+
"student_label": "uniform-k8",
|
| 25 |
+
"teacher_receipt_sha256": "2ae08117c3d4247f747b2a9a889b68e1a06387b788d56a0bf23bb950c77bc5a5"
|
| 26 |
+
}
|