Instructions to use Iman998/HexaBee-4B-Multilingual-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Iman998/HexaBee-4B-Multilingual-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Iman998/HexaBee-4B-Multilingual-Base") 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("Iman998/HexaBee-4B-Multilingual-Base") model = AutoModelForMultimodalLM.from_pretrained("Iman998/HexaBee-4B-Multilingual-Base", 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 Iman998/HexaBee-4B-Multilingual-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Iman998/HexaBee-4B-Multilingual-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Iman998/HexaBee-4B-Multilingual-Base", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Iman998/HexaBee-4B-Multilingual-Base
- SGLang
How to use Iman998/HexaBee-4B-Multilingual-Base 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 "Iman998/HexaBee-4B-Multilingual-Base" \ --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": "Iman998/HexaBee-4B-Multilingual-Base", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "Iman998/HexaBee-4B-Multilingual-Base" \ --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": "Iman998/HexaBee-4B-Multilingual-Base", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Iman998/HexaBee-4B-Multilingual-Base with Docker Model Runner:
docker model run hf.co/Iman998/HexaBee-4B-Multilingual-Base
HexaBee · Multilingual Base
The multilingual foundation behind the final translator.
Paper: Iman Barati, Mohammadmostafa Rostamkhani, and Mohammad Badzohreh, HexaBee-4B: Six-Language Translation with Multilingual Answering and Bidirectional Supervision, arXiv:2610.16361 (2026).
Overview · Quick start · Contents · Provenance · Limitations · Release family · Research code
Overview
Merged checkpoint after the multilingual answering and answer-text translation stage. This is the required base of the final translation adapter; it is an intermediate checkpoint, not the evaluated final HexaBee-4B translator.
| Property | Value |
|---|---|
| Artifact | HexaBee · Multilingual Base |
| Scope | Phase 2 merged base |
| Checkpoint | Merged model weights |
| Format | Safetensors + processor |
| Release | Audited historical artifacts |
| Model family | HexaBee-4B / Gemma 3 |
Quick start
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
repo = "Iman998/HexaBee-4B-Multilingual-Base"
processor = AutoProcessor.from_pretrained(repo)
model = AutoModelForImageTextToText.from_pretrained(
repo, torch_dtype=torch.bfloat16, device_map="auto"
).eval()
messages = [
{"role": "system", "content": [{"type": "text", "text": "Translate the following text from English into Persian."}]},
{"role": "user", "content": [{"type": "text", "text": "Language brings people together."}]}
]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True, return_dict=True,
return_tensors="pt"
).to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
The processor must preserve Gemma 3's system/user formatting. This short example uses a new 512-token generation budget; the archived evaluation used its own recorded inference settings.
Contents
Full two-shard Safetensors weights, Gemma 3 configuration, processor/tokenizer, and chat template. This merged checkpoint is the exact base for the final translation LoRA.
release_manifest.json lists distributed files, sizes, and SHA-256. release_stats.json records measured artifact metadata.
Provenance
Wikipedia adapter → continued multilingual SFT adapter → merge with Gemma 3 4B IT. Phase 2 used all 22 retained SFT datasets, totalling 30,153,404 records. No independent translation evaluation of this intermediate checkpoint is available.
This release is part of HexaBee-4B, previously labeled PCT-4B in the local evaluation audit. Both names refer to the same final translator. Renaming does not imply retraining. This repository is an artifact release, not evidence of workshop acceptance or an official shared-task ranking.
Limitations
The released checkpoint has not been evaluated for image tasks, despite retaining the Gemma 3 multimodal architecture. Intermediate checkpoints have no independent matched translation evaluation. Quality can vary by language, domain, and input length.
The complete adaptation recipe was evaluated; no matched ablation isolates the contribution of multilingual answering. Synthetic references and model-based judges limit interpretation. Long COMET inputs are truncated at the encoder limit. Use the independent evaluation repository for precise sample counts, parameters, all directions, and uncertainty estimates.
Release family
| Artifact | Repository |
|---|---|
| HexaBee-4B | Iman998/HexaBee-4B |
| HexaBee · Multilingual Base | Iman998/HexaBee-4B-Multilingual-Base |
| HexaBee · Wikipedia PT LoRA | Iman998/HexaBee-4B-PT-LoRA |
| HexaBee · Multilingual SFT LoRA | Iman998/HexaBee-4B-Multilingual-SFT-LoRA |
| HexaBee · Translation LoRA | Iman998/HexaBee-4B-Translation-LoRA |
| HexaBee · Wikipedia Foundations | Iman998/HexaBee-Wikipedia-PT |
| HexaBee · Multilingual Answering & Translation | Iman998/HexaBee-Multilingual-SFT |
| HexaBee · Bidirectional Translation | Iman998/HexaBee-Bidirectional-Translation |
| HexaBee · The Prompt Hive | Iman998/HexaBee-System-Prompts |
| HexaBee · Translation Archive | Iman998/HexaBee-Model-Outputs |
| HexaBee · Evaluation Atlas | Iman998/HexaBee-Evaluation |
Each phase, checkpoint, prompt inventory, output archive and evaluation result has its own repository and card. Model cards identify the exact adapter base; dataset cards identify the unit of a released row. Historical row counts are not counts of unique source articles.
License and attribution
See LICENSE.md. Model weights remain under Gemma terms; upstream dataset and service terms are not replaced by this repository's software license. The illustrated branding is decorative and does not encode experimental evidence.
Citation and references
Please cite Barati, Rostamkhani, and Badzohreh (2026), HexaBee-4B: Six-Language Translation with Multilingual Answering and Bidirectional Supervision. Research code.
Related methods and tools: Gemma 3, LoRA, LLaMA-Factory, SacreBLEU, COMET.
⬡ HexaBee-4B · FA · EN · AR · ZH · HE · ES
Maintained by Iman998
Cite this paper
@misc{barati2026hexabee4b,
title={HexaBee-4B: Six-Language Translation with Multilingual Answering and Bidirectional Supervision},
author={Barati, Iman and Rostamkhani, Mohammadmostafa and Badzohreh, Mohammad},
year={2026},
eprint={2610.16361},
archivePrefix={arXiv},
url={https://arxiv.org/abs/2610.16361}
}
- Downloads last month
- 5
Model tree for Iman998/HexaBee-4B-Multilingual-Base
Base model
google/gemma-3-4b-pt