Instructions to use unsloth/gemma-4-E2B-it-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use unsloth/gemma-4-E2B-it-NVFP4 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 unsloth/gemma-4-E2B-it-NVFP4 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 unsloth/gemma-4-E2B-it-NVFP4 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/gemma-4-E2B-it-NVFP4 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="unsloth/gemma-4-E2B-it-NVFP4", max_seq_length=2048, )
Add vLLM run instructions
Browse files
README.md
CHANGED
|
@@ -31,6 +31,20 @@ Gemma 4 can now be run and fine-tuned in [Unsloth Studio](https://unsloth.ai/doc
|
|
| 31 |
|
| 32 |
See all versions of Gemma 4 (GGUF, 16-bit etc.) [in our collection](https://huggingface.co/collections/unsloth/gemma-4).
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
---
|
| 35 |
|
| 36 |
<div align="center">
|
|
|
|
| 31 |
|
| 32 |
See all versions of Gemma 4 (GGUF, 16-bit etc.) [in our collection](https://huggingface.co/collections/unsloth/gemma-4).
|
| 33 |
|
| 34 |
+
## Run in vLLM
|
| 35 |
+
|
| 36 |
+
```shell
|
| 37 |
+
uv venv unsloth-nvfp4-env --python 3.13
|
| 38 |
+
source unsloth-nvfp4-env/bin/activate
|
| 39 |
+
uv pip install "vllm>=0.25.0" "flashinfer-python>=0.6.13" "nvidia-cutlass-dsl>=4.5.2" --torch-backend=auto
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
```shell
|
| 43 |
+
vllm serve unsloth/gemma-4-E2B-it-NVFP4
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
Do not use the Marlin backend (around 2x slower); let vLLM auto-select the NVFP4 kernel.
|
| 47 |
+
|
| 48 |
---
|
| 49 |
|
| 50 |
<div align="center">
|