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: remove the Barbados 1683 example
Browse files- README.md +0 -6
- assets/example_barbados_slave_code_1683.png +0 -3
README.md
CHANGED
|
@@ -313,12 +313,6 @@ Soma-1X Lite identifies handwritten text, administrative stamps and signatures,
|
|
| 313 |
|
| 314 |
*Handwritten correspondence with detected text and document elements. Source: British Library, Endangered Archives Programme, [EAP541](https://eap.bl.uk/project/EAP541).*
|
| 315 |
|
| 316 |
-
### Handwritten legal record: Barbados, 1683
|
| 317 |
-
|
| 318 |
-

|
| 319 |
-
|
| 320 |
-
*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.*
|
| 321 |
-
|
| 322 |
### Printed law in Kinyarwanda: Rwanda, 1977
|
| 323 |
|
| 324 |

|
|
|
|
| 313 |
|
| 314 |
*Handwritten correspondence with detected text and document elements. Source: British Library, Endangered Archives Programme, [EAP541](https://eap.bl.uk/project/EAP541).*
|
| 315 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
### Printed law in Kinyarwanda: Rwanda, 1977
|
| 317 |
|
| 318 |

|
assets/example_barbados_slave_code_1683.png
DELETED
Git LFS Details
|