Text Generation
Transformers
Safetensors
Indonesian
English
gemma3n
image-text-to-text
gemma
gemma-3n
unsloth
lora
fine-tuned
indonesian
english
conversational
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
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,6 +12,7 @@ tags:
|
|
| 12 |
- lora
|
| 13 |
- fine-tuned
|
| 14 |
- indonesian
|
|
|
|
| 15 |
- text-generation
|
| 16 |
---
|
| 17 |
|
|
@@ -54,4 +55,38 @@ The model uses the Gemma 3n chat template as follows:
|
|
| 54 |
<bos><start_of_turn>user
|
| 55 |
{instruction}<end_of_turn>
|
| 56 |
<start_of_turn>model
|
| 57 |
-
{output}<end_of_turn>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
- lora
|
| 13 |
- fine-tuned
|
| 14 |
- indonesian
|
| 15 |
+
- english
|
| 16 |
- text-generation
|
| 17 |
---
|
| 18 |
|
|
|
|
| 55 |
<bos><start_of_turn>user
|
| 56 |
{instruction}<end_of_turn>
|
| 57 |
<start_of_turn>model
|
| 58 |
+
{output}<end_of_turn>
|
| 59 |
+
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
## Model Capabilities
|
| 63 |
+
|
| 64 |
+
The model possesses the following capabilities:
|
| 65 |
+
|
| 66 |
+
* Comprehension of Indonesian-language instructions, including complex and multi-step instructions
|
| 67 |
+
* General knowledge and local Indonesian context, covering history, culture, geography, and everyday topics
|
| 68 |
+
* Generation of natural Indonesian text for various needs, such as explanations, summaries, and narratives
|
| 69 |
+
* Creative writing tasks in Indonesian, such as poetry (*puisi* and *pantun*), and short stories
|
| 70 |
+
* Translation between Indonesian and English
|
| 71 |
+
* Sentiment analysis and Indonesian text processing
|
| 72 |
+
* Basic mathematical reasoning and simple problem-solving
|
| 73 |
+
* Inherent multimodal capabilities (text, image, audio, video input; text output), although not reinforced through this fine-tuning
|
| 74 |
+
|
| 75 |
+
### Limitations
|
| 76 |
+
|
| 77 |
+
* The model is optimized for Indonesian text; performance on other languages or non-text modalities may decrease compared to the base model
|
| 78 |
+
* The model has not been comprehensively tested for multimodal tasks within the Indonesian context
|
| 79 |
+
* The model may produce hallucinations; verification of critical facts remains necessary
|
| 80 |
+
* The model has not undergone additional safety tuning; deployment in production applications should be accompanied by supervision
|
| 81 |
+
* Maximum context is 2048 tokens in accordance with training settings
|
| 82 |
+
|
| 83 |
+
## Credits
|
| 84 |
+
|
| 85 |
+
* Base model: Google DeepMind (Gemma 3n)
|
| 86 |
+
* Fine-tuning framework: Unsloth
|
| 87 |
+
* Dataset: AksaraLLM
|
| 88 |
+
* Fine-tuning and training: OpenPathAI
|
| 89 |
+
|
| 90 |
+
## License
|
| 91 |
+
|
| 92 |
+
This model follows Google's Gemma license. Commercial use is subject to the Gemma Terms of Use.
|