Instructions to use bunnycore/Gemma4-E2B-Coding-Distill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use bunnycore/Gemma4-E2B-Coding-Distill with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-e2b-it-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "bunnycore/Gemma4-E2B-Coding-Distill") - Transformers
How to use bunnycore/Gemma4-E2B-Coding-Distill with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bunnycore/Gemma4-E2B-Coding-Distill") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bunnycore/Gemma4-E2B-Coding-Distill", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bunnycore/Gemma4-E2B-Coding-Distill with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bunnycore/Gemma4-E2B-Coding-Distill" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bunnycore/Gemma4-E2B-Coding-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bunnycore/Gemma4-E2B-Coding-Distill
- SGLang
How to use bunnycore/Gemma4-E2B-Coding-Distill 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 "bunnycore/Gemma4-E2B-Coding-Distill" \ --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": "bunnycore/Gemma4-E2B-Coding-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "bunnycore/Gemma4-E2B-Coding-Distill" \ --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": "bunnycore/Gemma4-E2B-Coding-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use bunnycore/Gemma4-E2B-Coding-Distill with Docker Model Runner:
docker model run hf.co/bunnycore/Gemma4-E2B-Coding-Distill
Model Card: Gemma 4 E2B — Frontier Distilled LoRA
Overview
This repository provides a Low-Rank Adaptation (LoRA) adapter for Gemma 4 E2B. The adapter was fine-tuned on a focused dataset of several thousand high-signal instruction, reasoning, and conversational samples distilled from leading frontier models.
Model Details
Base Model:
google/gemma-4-e2b(Gemma 4 E2B)Adapter Type: LoRA (Low-Rank Adaptation)
Primary Task: Instruction following, structured reasoning, and conversational text generation
Language(s): English (primary)
License: Open weights under the Gemma Terms of Use; Apache 2.0 for custom adapter weights
PEFT 0.18.1
- Downloads last month
- -
16-bit