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: examples match the launch doc (add Barbados 1683 act and AEF 1932 covering letter, drop 1933 record)
Browse files
.gitattributes
CHANGED
|
@@ -45,3 +45,5 @@ assets/hero.png filter=lfs diff=lfs merge=lfs -text
|
|
| 45 |
assets/olmocr_bench.png filter=lfs diff=lfs merge=lfs -text
|
| 46 |
assets/opb_comparison.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
assets/training_pipeline.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 45 |
assets/olmocr_bench.png filter=lfs diff=lfs merge=lfs -text
|
| 46 |
assets/opb_comparison.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
assets/training_pipeline.png filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
assets/example_barbados_slave_code_1683.png filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
assets/example_aef_covering_letter_1932.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -271,41 +271,47 @@ Each example shows the page with numbered, colour-coded layout blocks (left) and
|
|
| 271 |
|
| 272 |
### Historical administrative records: Gold Coast Survey, 1928
|
| 273 |
|
| 274 |
-
|
| 275 |
|
| 276 |

|
| 277 |
|
| 278 |
-
*Source: British Library, Endangered Archives Programme, [EAP541](https://eap.bl.uk/project/EAP541).*
|
| 279 |
|
| 280 |
-
### Handwritten correspondence, 1927
|
|
|
|
|
|
|
| 281 |
|
| 282 |

|
| 283 |
|
| 284 |
-
*Source: British Library, Endangered Archives Programme, [EAP541](https://eap.bl.uk/project/EAP541).*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 285 |
|
| 286 |
-
|
| 287 |
|
| 288 |
-
|
| 289 |
|
| 290 |
-
|
| 291 |
|
| 292 |
-
|
| 293 |
|
| 294 |
-
|
| 295 |
|
| 296 |
-
|
| 297 |
|
| 298 |
-
|
| 299 |
|
| 300 |
-

|
| 277 |
|
| 278 |
+
*Structured document extraction from a 1928 Gold Coast administrative record. Source: British Library, Endangered Archives Programme, [EAP541](https://eap.bl.uk/project/EAP541).*
|
| 279 |
|
| 280 |
+
### Handwritten correspondence: government correspondence, 1927
|
| 281 |
+
|
| 282 |
+
Soma-1X Lite identifies handwritten text, administrative stamps and signatures, capturing both document content and its spatial organisation.
|
| 283 |
|
| 284 |

|
| 285 |
|
| 286 |
+
*Handwritten correspondence with detected text and document elements. Source: British Library, Endangered Archives Programme, [EAP541](https://eap.bl.uk/project/EAP541).*
|
| 287 |
+
|
| 288 |
+
### Handwritten legal record: Barbados, 1683
|
| 289 |
+
|
| 290 |
+

|
| 291 |
|
| 292 |
+
*Handwritten act from 1683, Barbados Slave Code (Huntington version). Source: Slavery, Law & Power in Early America and the British Empire, Barbados Slave Code – Huntington Version.*
|
| 293 |
|
| 294 |
+
### Printed law in Kinyarwanda: Rwanda, 1977
|
| 295 |
|
| 296 |
+

|
| 297 |
|
| 298 |
+
*Page from Rwanda's Decree-Law No. 02/77 of 5 January 1977, printed in Kinyarwanda.*
|
| 299 |
|
| 300 |
+
### Colonial administrative correspondence: French Equatorial Africa, 1932
|
| 301 |
|
| 302 |
+

|
| 303 |
|
| 304 |
+
*Covering letter from the Agence Économique de l'AEF to the Governor-General in Brazzaville, May 1932, with stamps and handwritten annotations. Source: Archives de l'Afrique Équatoriale Française (Brazzaville), dossier GG 535, Prospection pétrole (1932–1934).*
|
| 305 |
|
| 306 |
+

|
| 307 |
|
| 308 |
+
*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).*
|
| 309 |
|
| 310 |
+
### Newspaper: Die Afrikaanse Patriot, 1876
|
| 311 |
|
| 312 |
+

|
| 313 |
|
| 314 |
+
*Front page of the first issue of Die Afrikaanse Patriot, 15 January 1876, an early Afrikaans-language newspaper. Source: Genootskap van Regte Afrikaners, public domain, via [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Afrikaanse_Patriot.jpg).*
|
| 315 |
|
| 316 |
## Licence
|
| 317 |
|
assets/example_aef_covering_letter_1932.png
ADDED
|
Git LFS Details
|
assets/{example_handwritten_record_1933.png → example_barbados_slave_code_1683.png}
RENAMED
|
File without changes
|