Image-Text-to-Text
Transformers
Safetensors
gemma4_unified
gemma4
nvfp4
fp8
compressed-tensors
vllm
speculative-decoding
experimental
conversational
8-bit precision
Instructions to use DevelopingDad/Gemma4-12B-it-Fast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DevelopingDad/Gemma4-12B-it-Fast with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="DevelopingDad/Gemma4-12B-it-Fast") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("DevelopingDad/Gemma4-12B-it-Fast") model = AutoModelForMultimodalLM.from_pretrained("DevelopingDad/Gemma4-12B-it-Fast", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DevelopingDad/Gemma4-12B-it-Fast with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DevelopingDad/Gemma4-12B-it-Fast" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DevelopingDad/Gemma4-12B-it-Fast", "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/DevelopingDad/Gemma4-12B-it-Fast
- SGLang
How to use DevelopingDad/Gemma4-12B-it-Fast 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 "DevelopingDad/Gemma4-12B-it-Fast" \ --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": "DevelopingDad/Gemma4-12B-it-Fast", "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 "DevelopingDad/Gemma4-12B-it-Fast" \ --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": "DevelopingDad/Gemma4-12B-it-Fast", "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 DevelopingDad/Gemma4-12B-it-Fast with Docker Model Runner:
docker model run hf.co/DevelopingDad/Gemma4-12B-it-Fast
Fix license and checksum links in the rendered model card
Browse filesUse explicit blob URLs for extensionless legal and checksum files, and clarify that packed storage elements do not change the 12B architecture. Target weights, runtime sources, and measured recipe are unchanged.
- README.md +4 -2
- SHA256SUMS +2 -2
- serving/README.md +3 -1
README.md
CHANGED
|
@@ -42,13 +42,15 @@ A calibrated **mixed NVFP4/FP8 export of DevelopingDad's Gemma 4 12B IT Trial62*
|
|
| 42 |
|
| 43 |
The source contains 11,959,730,224 stored BF16 parameter elements across 48 language layers. Its native configuration permits 262,144 total positions; **this release's tested serving recipe uses 32,768 total prompt-plus-output tokens**.
|
| 44 |
|
|
|
|
|
|
|
| 45 |
Text MLP weights use importance-weighted MSE NVFP4, groups of 16, static FP8 block scales and global divisors. MLP activations use locally dynamic NVFP4. Attention weights use per-channel FP8 and activations use dynamic per-token FP8. K/V scales are calibrated FP8 scalars. Original tied BF16 embedding/output-head and media projections are retained.
|
| 46 |
|
| 47 |
Calibration used 128 English C4 training rows, seed 91027, maximum 1,024 tokens, a 512-row shuffle buffer, and dataset revision `607bd4c8450a42878aa9ddc051a65a055450ef87`. Benchmark/quality prompts and observed answers were excluded from calibration. This was post-training quantization; no new alignment or refusal-removal training was performed. The original Trial62 modification method is not documented in its source repository and is not inferred here.
|
| 48 |
|
| 49 |
The converter handles Gemma's heterogeneous attention dimensions per layer: 40 sliding layers with eight KV heads and eight full layers with one KV head. Gate/up projection observers share their global statistics before packing. All 48 KV initializers, 144 packed MLP weights, and 48 shared gate/up scale pairs passed the export audits. These checks establish export integrity, not broad quality equivalence.
|
| 50 |
|
| 51 |
-
See [MODIFICATIONS.md](MODIFICATIONS.md), [provenance.json](provenance.json), and [SHA256SUMS](SHA256SUMS).
|
| 52 |
|
| 53 |
## Credits and attribution
|
| 54 |
|
|
@@ -135,7 +137,7 @@ Media-related components and native protocols are retained, but this release did
|
|
| 135 |
|
| 136 |
## License, notices and citation
|
| 137 |
|
| 138 |
-
The model derives from Google's Apache-2.0 Gemma 4 release. This repository includes [LICENSE](LICENSE), [NOTICE](NOTICE), and [MODIFICATIONS.md](MODIFICATIONS.md). Existing upstream SPDX/copyright headers are retained in the optional runtime source files. C4's separate ODC-BY license and Common Crawl terms apply to the calibration corpus; no corpus text is distributed here.
|
| 139 |
|
| 140 |
Please credit the original Gemma authors, DevelopingDad's Trial62 checkpoint, this conversion, and any assistant/runtime/tooling used in your deployment. Google's original citation is:
|
| 141 |
|
|
|
|
| 42 |
|
| 43 |
The source contains 11,959,730,224 stored BF16 parameter elements across 48 language layers. Its native configuration permits 262,144 total positions; **this release's tested serving recipe uses 32,768 total prompt-plus-output tokens**.
|
| 44 |
|
| 45 |
+
The Hub's automatic parameter counter can count packed U8 storage elements rather than logical weights. Each NVFP4 byte stores two logical weights; the smaller automatic count does not mean this is an 8B architecture.
|
| 46 |
+
|
| 47 |
Text MLP weights use importance-weighted MSE NVFP4, groups of 16, static FP8 block scales and global divisors. MLP activations use locally dynamic NVFP4. Attention weights use per-channel FP8 and activations use dynamic per-token FP8. K/V scales are calibrated FP8 scalars. Original tied BF16 embedding/output-head and media projections are retained.
|
| 48 |
|
| 49 |
Calibration used 128 English C4 training rows, seed 91027, maximum 1,024 tokens, a 512-row shuffle buffer, and dataset revision `607bd4c8450a42878aa9ddc051a65a055450ef87`. Benchmark/quality prompts and observed answers were excluded from calibration. This was post-training quantization; no new alignment or refusal-removal training was performed. The original Trial62 modification method is not documented in its source repository and is not inferred here.
|
| 50 |
|
| 51 |
The converter handles Gemma's heterogeneous attention dimensions per layer: 40 sliding layers with eight KV heads and eight full layers with one KV head. Gate/up projection observers share their global statistics before packing. All 48 KV initializers, 144 packed MLP weights, and 48 shared gate/up scale pairs passed the export audits. These checks establish export integrity, not broad quality equivalence.
|
| 52 |
|
| 53 |
+
See [MODIFICATIONS.md](MODIFICATIONS.md), [provenance.json](provenance.json), and [SHA256SUMS](https://huggingface.co/DevelopingDad/Gemma4-12B-it-Fast/blob/main/SHA256SUMS).
|
| 54 |
|
| 55 |
## Credits and attribution
|
| 56 |
|
|
|
|
| 137 |
|
| 138 |
## License, notices and citation
|
| 139 |
|
| 140 |
+
The model derives from Google's Apache-2.0 Gemma 4 release. This repository includes [LICENSE](https://huggingface.co/DevelopingDad/Gemma4-12B-it-Fast/blob/main/LICENSE), [NOTICE](https://huggingface.co/DevelopingDad/Gemma4-12B-it-Fast/blob/main/NOTICE), and [MODIFICATIONS.md](MODIFICATIONS.md). Existing upstream SPDX/copyright headers are retained in the optional runtime source files. C4's separate ODC-BY license and Common Crawl terms apply to the calibration corpus; no corpus text is distributed here.
|
| 141 |
|
| 142 |
Please credit the original Gemma authors, DevelopingDad's Trial62 checkpoint, this conversion, and any assistant/runtime/tooling used in your deployment. Google's original citation is:
|
| 143 |
|
SHA256SUMS
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
| 3 |
0518adcfc7d7b9f5321fac1f13ebda74a616d6df4e61018404a1a5a26a391e3d MODIFICATIONS.md
|
| 4 |
8340e3a16a607320a17af5aafc54a55f2f525cad61275f2e32fc2104f42f51a2 NOTICE
|
| 5 |
-
|
| 6 |
a7a3fcaac51cc49a86c5103acd1e9c3b639fd8555f1f947d37a7f32e4d608f08 benchmarks/README.md
|
| 7 |
0cdbc85335f31d11e7754de8158408eda6fb6cf7d61010af7e8cfad91db93b2f benchmarks/results.json
|
| 8 |
37ee3e82f78e1fcf6254d455d146f6cdb5454d2f90228e38a57f93aeb287619d benchmarks/workload.json
|
|
@@ -12,7 +12,7 @@ f0f7ca9ea682738696f3960e39c427db6e3a4ff315265b13f4799125884e1dee generation_con
|
|
| 12 |
63536b8ec8456dddf8bbb7a71148bf2ab8499394c60226de2039e8846903a04b model.safetensors
|
| 13 |
6b938e76555b3e9946890770e1abcd442a4718f34041a58e8139dc8ad34545c9 processor_config.json
|
| 14 |
56a8815db5692430ba558a90df8c35f0a277436ff4054cebdf0a657b2c75f245 provenance.json
|
| 15 |
-
|
| 16 |
f09777985cdbbf19d137cfffe58979c486caf255321f6b2d791370955c04e11f serving/artifact-manifest.json
|
| 17 |
f9218019c51ea808fa4fe42ec362ea2b41f1300b662de14c1fb1989624a15005 serving/build_profile_template.py
|
| 18 |
1432bc7f4c39852ade1f5e4fcc3e73c6eaef440d88b3983a784d4eb39ac27ed1 serving/draft_head_fp8_overlay.py
|
|
|
|
| 2 |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
| 3 |
0518adcfc7d7b9f5321fac1f13ebda74a616d6df4e61018404a1a5a26a391e3d MODIFICATIONS.md
|
| 4 |
8340e3a16a607320a17af5aafc54a55f2f525cad61275f2e32fc2104f42f51a2 NOTICE
|
| 5 |
+
2d6f213d266a9a0ca2f7717ac54db8609d00f018538b74f9053bd43985ea1221 README.md
|
| 6 |
a7a3fcaac51cc49a86c5103acd1e9c3b639fd8555f1f947d37a7f32e4d608f08 benchmarks/README.md
|
| 7 |
0cdbc85335f31d11e7754de8158408eda6fb6cf7d61010af7e8cfad91db93b2f benchmarks/results.json
|
| 8 |
37ee3e82f78e1fcf6254d455d146f6cdb5454d2f90228e38a57f93aeb287619d benchmarks/workload.json
|
|
|
|
| 12 |
63536b8ec8456dddf8bbb7a71148bf2ab8499394c60226de2039e8846903a04b model.safetensors
|
| 13 |
6b938e76555b3e9946890770e1abcd442a4718f34041a58e8139dc8ad34545c9 processor_config.json
|
| 14 |
56a8815db5692430ba558a90df8c35f0a277436ff4054cebdf0a657b2c75f245 provenance.json
|
| 15 |
+
6c4ce8f6936c3a3ff1d0d6de8543957ff0f4a0b8ae669f633b91e31417e3f6b6 serving/README.md
|
| 16 |
f09777985cdbbf19d137cfffe58979c486caf255321f6b2d791370955c04e11f serving/artifact-manifest.json
|
| 17 |
f9218019c51ea808fa4fe42ec362ea2b41f1300b662de14c1fb1989624a15005 serving/build_profile_template.py
|
| 18 |
1432bc7f4c39852ade1f5e4fcc3e73c6eaef440d88b3983a784d4eb39ac27ed1 serving/draft_head_fp8_overlay.py
|
serving/README.md
CHANGED
|
@@ -76,6 +76,8 @@ reported rates. Local deployment orchestration and private endpoints are not
|
|
| 76 |
part of this public package.
|
| 77 |
|
| 78 |
See overlay-manifest.json for upstream-original, tested-source and public-file
|
| 79 |
-
hashes. See
|
|
|
|
|
|
|
| 80 |
The sanitized successful runtime check is in startup-integrity.json; artifact-manifest.json
|
| 81 |
binds the exact target files and separately downloaded assistant to their hashes.
|
|
|
|
| 76 |
part of this public package.
|
| 77 |
|
| 78 |
See overlay-manifest.json for upstream-original, tested-source and public-file
|
| 79 |
+
hashes. See [LICENSE](https://huggingface.co/DevelopingDad/Gemma4-12B-it-Fast/blob/main/LICENSE),
|
| 80 |
+
[NOTICE](https://huggingface.co/DevelopingDad/Gemma4-12B-it-Fast/blob/main/NOTICE)
|
| 81 |
+
and [MODIFICATIONS.md](../MODIFICATIONS.md) for attribution.
|
| 82 |
The sanitized successful runtime check is in startup-integrity.json; artifact-manifest.json
|
| 83 |
binds the exact target files and separately downloaded assistant to their hashes.
|