Instructions to use OpenPathAI/Orbit-4-Gemma-E4B-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenPathAI/Orbit-4-Gemma-E4B-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenPathAI/Orbit-4-Gemma-E4B-it") 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("OpenPathAI/Orbit-4-Gemma-E4B-it") model = AutoModelForMultimodalLM.from_pretrained("OpenPathAI/Orbit-4-Gemma-E4B-it", 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 OpenPathAI/Orbit-4-Gemma-E4B-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenPathAI/Orbit-4-Gemma-E4B-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenPathAI/Orbit-4-Gemma-E4B-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OpenPathAI/Orbit-4-Gemma-E4B-it
- SGLang
How to use OpenPathAI/Orbit-4-Gemma-E4B-it 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 "OpenPathAI/Orbit-4-Gemma-E4B-it" \ --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": "OpenPathAI/Orbit-4-Gemma-E4B-it", "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 "OpenPathAI/Orbit-4-Gemma-E4B-it" \ --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": "OpenPathAI/Orbit-4-Gemma-E4B-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use OpenPathAI/Orbit-4-Gemma-E4B-it with Docker Model Runner:
docker model run hf.co/OpenPathAI/Orbit-4-Gemma-E4B-it
Download README.md from OpenPathAI/Orbit-4-Gemma-E4B-it: direct link, hf CLI and curl.
- Browser
- Download file 3.51 kB
-
https://huggingface.co/OpenPathAI/Orbit-4-Gemma-E4B-it/resolve/main/README.md
- Command line
-
hf download hf://OpenPathAI/Orbit-4-Gemma-E4B-it/README.md
-
curl -L -o README.md https://huggingface.co/OpenPathAI/Orbit-4-Gemma-E4B-it/resolve/main/README.md
language:
- id
- en
license: gemma
library_name: transformers
base_model: google/gemma-3n-E4B-it
tags:
- gemma
- gemma-3n
- unsloth
- lora
- fine-tuned
- indonesian
- english
- text-generation
Orbit-4-Gemma-E4B-it
Model Description
Orbit-4-Gemma-E4B-it is a language model fine-tuned from Gemma 3n E4B-it, developed to enhance comprehension and knowledge capabilities in the Indonesian language.
The fine-tuning focuses on strengthening the model's ability to follow instructions in Indonesian, understand local context, and generate more natural and relevant responses. The training process utilized a large-scale Indonesian instruction dataset and spanned a full epoch without sampling.
This model retains the multimodal architecture of the Gemma 3n base model, meaning it structurally still supports text, image, audio, and video processing. However, the fine-tuning process was performed exclusively on the text layers, so multimodal performance was not specifically reinforced through this training.
Model Specifications
| Item | Detail |
|---|---|
| Base model | google/gemma-3n-E4B-it |
| Fine-tuning method | LoRA (r=16, alpha=16) |
| Epoch | 1 full epoch (approx. 29,807 steps) |
| Effective batch size | 4 (batch size 1 x gradient accumulation 4) |
| Learning rate | 2e-4 (linear schedule) |
| Warmup | 3% of total steps |
| Max sequence length | 2048 tokens |
| Optimizer | adamw_8bit |
| Weight decay | 0.01 |
| LoRA dropout | 0 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Merge precision | float32 (performed on CPU) |
| Training hardware | Tesla T4 16GB |
| Framework | Unsloth, TRL, Transformers |
| Prompt format | Gemma 3n chat template |
| Seed | 3407 |
Prompt Format
The model uses the Gemma 3n chat template as follows:
<bos><start_of_turn>user
{instruction}<end_of_turn>
<start_of_turn>model
{output}<end_of_turn>
Model Capabilities
The model possesses the following capabilities:
- Comprehension of Indonesian-language instructions, including complex and multi-step instructions
- General knowledge and local Indonesian context, covering history, culture, geography, and everyday topics
- Generation of natural Indonesian text for various needs, such as explanations, summaries, and narratives
- Creative writing tasks in Indonesian, such as poetry (puisi and pantun), and short stories
- Translation between Indonesian and English
- Sentiment analysis and Indonesian text processing
- Basic mathematical reasoning and simple problem-solving
- Inherent multimodal capabilities (text, image, audio, video input; text output), although not reinforced through this fine-tuning
Limitations
- The model is optimized for Indonesian text; performance on other languages or non-text modalities may decrease compared to the base model
- The model has not been comprehensively tested for multimodal tasks within the Indonesian context
- The model may produce hallucinations; verification of critical facts remains necessary
- The model has not undergone additional safety tuning; deployment in production applications should be accompanied by supervision
- Maximum context is 2048 tokens in accordance with training settings
Credits
- Base model: Google DeepMind (Gemma 3n)
- Fine-tuning framework: Unsloth
- Dataset: AksaraLLM
- Fine-tuning and training: OpenPathAI
License
This model follows Google's Gemma license. Commercial use is subject to the Gemma Terms of Use.