Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

AminiTech
/
Soma-1X-lite

Image-Text-to-Text
Transformers
Safetensors
qwen3_5
document-parsing
ocr
layout-analysis
table-recognition
vision-language
african-languages
handwriting
conversational
Model card Files Files and versions
xet
Community
1

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
Soma-1X-lite / assets
7.2 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 5 commits
amini-ai's picture
amini-ai
Model card: remove the Barbados 1683 example
de44b6a verified about 20 hours ago
  • african_cer.png
    198 kB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • example_aef_covering_letter_1932.png
    1.01 MB
    xet
    Model card: examples match the launch doc (add Barbados 1683 act and AEF 1932 covering letter, drop 1933 record) about 21 hours ago
  • example_afrikaans_newspaper_1876.png
    796 kB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • example_correspondence_1927.png
    696 kB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • example_french_report_1932.png
    799 kB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • example_gold_coast_1928.png
    1 MB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • example_kinyarwanda_1977.png
    687 kB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • hero.png
    1.28 MB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • olmocr_bench.png
    197 kB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • opb_comparison.png
    257 kB
    xet
    Add model card, figures and default prompts about 23 hours ago
  • opb_multipass.png
    63.2 kB
    Add model card, figures and default prompts about 23 hours ago
  • training_pipeline.png
    203 kB
    xet
    Model card: updated training pipeline figure; captions and source from the launch doc about 22 hours ago