Text Generation
Transformers
Safetensors
Bengali
English
bengali
gemma
fine-tuned
conversational-ai
multimodal
voice-synthesis
langchain
LoRA
4bit-quantization
conversational
Instructions to use retro56/gemma3-4b-bengali-multimodal-persona with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use retro56/gemma3-4b-bengali-multimodal-persona with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="retro56/gemma3-4b-bengali-multimodal-persona") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("retro56/gemma3-4b-bengali-multimodal-persona", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use retro56/gemma3-4b-bengali-multimodal-persona with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "retro56/gemma3-4b-bengali-multimodal-persona" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "retro56/gemma3-4b-bengali-multimodal-persona", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/retro56/gemma3-4b-bengali-multimodal-persona
- SGLang
How to use retro56/gemma3-4b-bengali-multimodal-persona 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 "retro56/gemma3-4b-bengali-multimodal-persona" \ --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": "retro56/gemma3-4b-bengali-multimodal-persona", "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 "retro56/gemma3-4b-bengali-multimodal-persona" \ --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": "retro56/gemma3-4b-bengali-multimodal-persona", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use retro56/gemma3-4b-bengali-multimodal-persona with Docker Model Runner:
docker model run hf.co/retro56/gemma3-4b-bengali-multimodal-persona
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,8 +17,7 @@ tags:
|
|
| 17 |
- 4bit-quantization
|
| 18 |
datasets:
|
| 19 |
- iamshnoo/alpaca-cleaned-bengali
|
| 20 |
-
|
| 21 |
-
base_model: google/gemma-2-27b-it
|
| 22 |
model_type: gemma2
|
| 23 |
---
|
| 24 |
|
|
@@ -28,7 +27,7 @@ model_type: gemma2
|
|
| 28 |
|
| 29 |
## Model Description
|
| 30 |
|
| 31 |
-
This model is a fine-tuned version of [google/gemma-2-
|
| 32 |
|
| 33 |
### Key Features
|
| 34 |
|
|
@@ -48,7 +47,7 @@ This model is a fine-tuned version of [google/gemma-2-27b-it](https://huggingfac
|
|
| 48 |
- **Total Examples**: ~8,000 high-quality Bengali examples
|
| 49 |
|
| 50 |
### Training Configuration
|
| 51 |
-
- **Base Model**: google/gemma-2-
|
| 52 |
- **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
|
| 53 |
- **Quantization**: 4-bit using BitsAndBytesConfig
|
| 54 |
- **LoRA Rank**: 16
|
|
@@ -76,7 +75,7 @@ import torch
|
|
| 76 |
|
| 77 |
# Load the model and tokenizer
|
| 78 |
base_model = AutoModelForCausalLM.from_pretrained(
|
| 79 |
-
"google/gemma-2-
|
| 80 |
torch_dtype=torch.float16,
|
| 81 |
device_map="auto"
|
| 82 |
)
|
|
@@ -177,23 +176,23 @@ See the [complete notebook](https://github.com/your-repo/gemma3-bengali-multimod
|
|
| 177 |
|
| 178 |
## Model Card Authors
|
| 179 |
|
| 180 |
-
Created by the
|
| 181 |
|
| 182 |
## Citation
|
| 183 |
|
| 184 |
```bibtex
|
| 185 |
@misc{gemma2-bengali-multimodal,
|
| 186 |
-
title={Gemma 2
|
| 187 |
-
author={
|
| 188 |
-
year={
|
| 189 |
url={https://huggingface.co/retro56/gemma3-4b-bengali-multimodal-persona}
|
| 190 |
}
|
| 191 |
```
|
| 192 |
|
| 193 |
## License
|
| 194 |
|
| 195 |
-
This model is licensed under the Gemma License. See the [original model](https://huggingface.co/google/gemma-2-
|
| 196 |
|
| 197 |
---
|
| 198 |
|
| 199 |
-
**Built with ❤️ for the Bengali AI community**
|
|
|
|
| 17 |
- 4bit-quantization
|
| 18 |
datasets:
|
| 19 |
- iamshnoo/alpaca-cleaned-bengali
|
| 20 |
+
base_model: google/gemma-2-4b-it
|
|
|
|
| 21 |
model_type: gemma2
|
| 22 |
---
|
| 23 |
|
|
|
|
| 27 |
|
| 28 |
## Model Description
|
| 29 |
|
| 30 |
+
This model is a fine-tuned version of [google/gemma-2-4b-it](https://huggingface.co/google/gemma-2-4b-it) specifically optimized for Bengali language conversations and multimodal AI persona applications. The model has been trained to provide natural, helpful responses in Bengali and can be integrated with voice synthesis for complete multimodal AI experiences.
|
| 31 |
|
| 32 |
### Key Features
|
| 33 |
|
|
|
|
| 47 |
- **Total Examples**: ~8,000 high-quality Bengali examples
|
| 48 |
|
| 49 |
### Training Configuration
|
| 50 |
+
- **Base Model**: google/gemma-2-4b-it
|
| 51 |
- **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
|
| 52 |
- **Quantization**: 4-bit using BitsAndBytesConfig
|
| 53 |
- **LoRA Rank**: 16
|
|
|
|
| 75 |
|
| 76 |
# Load the model and tokenizer
|
| 77 |
base_model = AutoModelForCausalLM.from_pretrained(
|
| 78 |
+
"google/gemma-2-4b-it",
|
| 79 |
torch_dtype=torch.float16,
|
| 80 |
device_map="auto"
|
| 81 |
)
|
|
|
|
| 176 |
|
| 177 |
## Model Card Authors
|
| 178 |
|
| 179 |
+
Created by the Personify research team for advancing Bengali language AI capabilities.
|
| 180 |
|
| 181 |
## Citation
|
| 182 |
|
| 183 |
```bibtex
|
| 184 |
@misc{gemma2-bengali-multimodal,
|
| 185 |
+
title={Gemma 2 4B Bengali Multimodal Persona},
|
| 186 |
+
author={Personify Research Team},
|
| 187 |
+
year={2025},
|
| 188 |
url={https://huggingface.co/retro56/gemma3-4b-bengali-multimodal-persona}
|
| 189 |
}
|
| 190 |
```
|
| 191 |
|
| 192 |
## License
|
| 193 |
|
| 194 |
+
This model is licensed under the Gemma License. See the [original model](https://huggingface.co/google/gemma-2-4b-it) for complete license terms.
|
| 195 |
|
| 196 |
---
|
| 197 |
|
| 198 |
+
**Built with ❤️ for the Bengali AI community**
|