Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • 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

Spravil
/
caption-via-translation-1_0B

Image-Text-to-Text
Transformers
Safetensors
florence2
Image-to-Text
Image-Text-to-Text
Translation
custom_code
Model card Files Files and versions
xet
Community

Instructions to use Spravil/caption-via-translation-1_0B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Spravil/caption-via-translation-1_0B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="Spravil/caption-via-translation-1_0B", trust_remote_code=True, device_map="auto")
    # Load model directly
    from transformers import AutoProcessor, AutoModelForMultimodalLM
    
    processor = AutoProcessor.from_pretrained("Spravil/caption-via-translation-1_0B", trust_remote_code=True)
    model = AutoModelForMultimodalLM.from_pretrained("Spravil/caption-via-translation-1_0B", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use Spravil/caption-via-translation-1_0B with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "Spravil/caption-via-translation-1_0B"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Spravil/caption-via-translation-1_0B",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/Spravil/caption-via-translation-1_0B
  • SGLang

    How to use Spravil/caption-via-translation-1_0B 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 "Spravil/caption-via-translation-1_0B" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Spravil/caption-via-translation-1_0B",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    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 "Spravil/caption-via-translation-1_0B" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Spravil/caption-via-translation-1_0B",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use Spravil/caption-via-translation-1_0B with Docker Model Runner:

    docker model run hf.co/Spravil/caption-via-translation-1_0B
caption-via-translation-1_0B
2.08 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
Spravil's picture
Spravil
Upload README.md with huggingface_hub
ac5f8bd verified 6 months ago
  • .gitattributes
    1.52 kB
    initial commit 6 months ago
  • README.md
    3.08 kB
    Upload README.md with huggingface_hub 6 months ago
  • config.json
    3.94 kB
    Upload folder using huggingface_hub 6 months ago
  • configuration_florence2.py
    16.2 kB
    Upload folder using huggingface_hub 6 months ago
  • generation_config.json
    292 Bytes
    Upload folder using huggingface_hub 6 months ago
  • model.safetensors
    2.08 GB
    xet
    Upload folder using huggingface_hub 6 months ago
  • modeling_florence2.py
    126 kB
    Upload folder using huggingface_hub 6 months ago
  • preprocessor_config.json
    723 Bytes
    Upload folder using huggingface_hub 6 months ago
  • processing_florence2.py
    53.8 kB
    Upload folder using huggingface_hub 6 months ago
  • tokenizer.json
    1.36 MB
    Upload folder using huggingface_hub 6 months ago
  • tokenizer_config.json
    34 Bytes
    Upload folder using huggingface_hub 6 months ago
  • vocab.json
    1.1 MB
    Upload folder using huggingface_hub 6 months ago