Instructions to use unsloth/gemma-3n-E2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/gemma-3n-E2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="unsloth/gemma-3n-E2B")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("unsloth/gemma-3n-E2B") model = AutoModelForMultimodalLM.from_pretrained("unsloth/gemma-3n-E2B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unsloth/gemma-3n-E2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/gemma-3n-E2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/gemma-3n-E2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/unsloth/gemma-3n-E2B
- SGLang
How to use unsloth/gemma-3n-E2B 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 "unsloth/gemma-3n-E2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/gemma-3n-E2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "unsloth/gemma-3n-E2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/gemma-3n-E2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use unsloth/gemma-3n-E2B with Docker Model Runner:
docker model run hf.co/unsloth/gemma-3n-E2B
Upload folder using huggingface_hub
Browse files
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ad7f456ac09b2a12ed0616371bfe7ea0b0bd6b0be4a553ccf559280e3207ec9
|
| 3 |
+
size 3077103824
|
model.safetensors.index.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_parameters":
|
| 4 |
-
"total_size":
|
| 5 |
},
|
| 6 |
"weight_map": {
|
| 7 |
"model.audio_tower.conformer.0.attention.attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
|
@@ -1553,6 +1553,7 @@
|
|
| 1553 |
"model.vision_tower.timm_model.blocks.3.9.layer_scale.gamma": "model-00001-of-00003.safetensors",
|
| 1554 |
"model.vision_tower.timm_model.blocks.3.9.norm.weight": "model-00001-of-00003.safetensors",
|
| 1555 |
"model.vision_tower.timm_model.conv_stem.bn.weight": "model-00001-of-00003.safetensors",
|
|
|
|
| 1556 |
"model.vision_tower.timm_model.conv_stem.conv.weight": "model-00001-of-00003.safetensors",
|
| 1557 |
"model.vision_tower.timm_model.msfa.ffn.pw_exp.bn.weight": "model-00001-of-00003.safetensors",
|
| 1558 |
"model.vision_tower.timm_model.msfa.ffn.pw_exp.conv.weight": "model-00001-of-00003.safetensors",
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_parameters": 5976833472,
|
| 4 |
+
"total_size": 10878876544
|
| 5 |
},
|
| 6 |
"weight_map": {
|
| 7 |
"model.audio_tower.conformer.0.attention.attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
|
|
|
| 1553 |
"model.vision_tower.timm_model.blocks.3.9.layer_scale.gamma": "model-00001-of-00003.safetensors",
|
| 1554 |
"model.vision_tower.timm_model.blocks.3.9.norm.weight": "model-00001-of-00003.safetensors",
|
| 1555 |
"model.vision_tower.timm_model.conv_stem.bn.weight": "model-00001-of-00003.safetensors",
|
| 1556 |
+
"model.vision_tower.timm_model.conv_stem.conv.bias": "model-00001-of-00003.safetensors",
|
| 1557 |
"model.vision_tower.timm_model.conv_stem.conv.weight": "model-00001-of-00003.safetensors",
|
| 1558 |
"model.vision_tower.timm_model.msfa.ffn.pw_exp.bn.weight": "model-00001-of-00003.safetensors",
|
| 1559 |
"model.vision_tower.timm_model.msfa.ffn.pw_exp.conv.weight": "model-00001-of-00003.safetensors",
|