Instructions to use jetbabareal/gemma-3-1b-elite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jetbabareal/gemma-3-1b-elite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jetbabareal/gemma-3-1b-elite") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("jetbabareal/gemma-3-1b-elite") model = AutoModelForMultimodalLM.from_pretrained("jetbabareal/gemma-3-1b-elite") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jetbabareal/gemma-3-1b-elite with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jetbabareal/gemma-3-1b-elite" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jetbabareal/gemma-3-1b-elite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jetbabareal/gemma-3-1b-elite
- SGLang
How to use jetbabareal/gemma-3-1b-elite 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 "jetbabareal/gemma-3-1b-elite" \ --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": "jetbabareal/gemma-3-1b-elite", "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 "jetbabareal/gemma-3-1b-elite" \ --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": "jetbabareal/gemma-3-1b-elite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jetbabareal/gemma-3-1b-elite with Docker Model Runner:
docker model run hf.co/jetbabareal/gemma-3-1b-elite
Gemma 3 - 1B Elite Fusion (Experimental)
This model is the result of a specialized "Elite Neuron Fusion" technique applied to the Gemma architecture. It is not a standard model merge; rather, it uses a surgical approach to inject reasoning capabilities from earlier layers into deeper layers.
🔬 Methodology: Elite Neuron Fusion
Unlike traditional merging methods (SLERP, Linear) that blend entire weights, this method uses a density-based injection algorithm.
- Layer Analysis: We identified specific resonance pairs between source (early-mid) and target (mid-deep) layers.
- Top-k Filtering: For each pair, we calculated the delta vector (difference).
- Density Selection: Only the top 20% of neurons with the highest activation/change were selected.
- Injection: These "elite" neurons were injected into the target layers with a specific alpha scaling factor.
Technical Configuration
- Source Layers: 16, 15, 14, 13, 12
- Target Layers: 17, 18, 19, 20, 21
- Density: 0.20 (Only 20% of weights are modified per layer)
- Alpha: 0.40
- Logic:
Target = Target + (Delta * Mask * Alpha)
🎯 Goal
The primary goal of this experiment is to enhance the reasoning and logic capabilities of smaller language models (1B-2B range) without destroying their pre-trained knowledge base or causing severe hallucinations.
💻 Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "jetbabareal/gemma-3-1b-elite"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
input_text = "Question: ?\nAnswer:"
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=50)
print(tokenizer.decode(outputs[0]))
Developer: jetbabareal Algorithm: Elite Neuron Fusion
- Downloads last month
- 6