Image-Text-to-Text
Transformers
Safetensors
qwen3_5
document-parsing
ocr
layout-analysis
table-recognition
vision-language
african-languages
handwriting
conversational
Instructions to use AminiTech/Soma-1X-lite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AminiTech/Soma-1X-lite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AminiTech/Soma-1X-lite") 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("AminiTech/Soma-1X-lite") model = AutoModelForMultimodalLM.from_pretrained("AminiTech/Soma-1X-lite", 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 AminiTech/Soma-1X-lite with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AminiTech/Soma-1X-lite" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AminiTech/Soma-1X-lite", "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/AminiTech/Soma-1X-lite
- SGLang
How to use AminiTech/Soma-1X-lite 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 "AminiTech/Soma-1X-lite" \ --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": "AminiTech/Soma-1X-lite", "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 "AminiTech/Soma-1X-lite" \ --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": "AminiTech/Soma-1X-lite", "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 AminiTech/Soma-1X-lite with Docker Model Runner:
docker model run hf.co/AminiTech/Soma-1X-lite
Model card: updated training pipeline figure; captions and source from the launch doc
Browse files- README.md +3 -3
- assets/training_pipeline.png +2 -2
README.md
CHANGED
|
@@ -261,7 +261,7 @@ Our training approach emphasises joint spatial-semantic representation, transcri
|
|
| 261 |
|
| 262 |
To complement real-world document collections, we developed **Soma-Sim**, a programmable document generation engine that enables targeted generation of diverse document layouts, multilingual content, complex structures and challenging visual conditions with precise ground-truth annotations.
|
| 263 |
|
| 264 |
-

|
| 295 |
|
| 296 |
-
*
|
| 297 |
|
| 298 |
### Newspaper (Afrikaans), 1876
|
| 299 |
|
|
@@ -305,7 +305,7 @@ Typed text, handwritten annotations, stamps and signatures, in reading order and
|
|
| 305 |
|
| 306 |

|
| 307 |
|
| 308 |
-
*
|
| 309 |
|
| 310 |
## Licence
|
| 311 |
|
|
|
|
| 261 |
|
| 262 |
To complement real-world document collections, we developed **Soma-Sim**, a programmable document generation engine that enables targeted generation of diverse document layouts, multilingual content, complex structures and challenging visual conditions with precise ground-truth annotations.
|
| 263 |
|
| 264 |
+

|
| 265 |
|
| 266 |
*Overview of the Soma-1X Lite training and continuous improvement pipeline.*
|
| 267 |
|
|
|
|
| 293 |
|
| 294 |

|
| 295 |
|
| 296 |
+
*Typewritten report, Paris, 24 May 1932, on the publication of a 1:50,000 map of the Pointe-Noire region. Source: Archives de l’Afrique Équatoriale Française (Brazzaville), dossier GG 535, Prospection pétrole (1932–1934).*
|
| 297 |
|
| 298 |
### Newspaper (Afrikaans), 1876
|
| 299 |
|
|
|
|
| 305 |
|
| 306 |

|
| 307 |
|
| 308 |
+
*Page from Rwanda’s Decree-Law No. 02/77 of 5 January 1977, printed in Kinyarwanda.*
|
| 309 |
|
| 310 |
## Licence
|
| 311 |
|
assets/training_pipeline.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|