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-3_5B

Image-Text-to-Text
Transformers
Safetensors
florencegemma2
text-generation
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-3_5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Spravil/caption-via-translation-3_5B 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-3_5B", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("Spravil/caption-via-translation-3_5B", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use Spravil/caption-via-translation-3_5B 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-3_5B"
    # 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-3_5B",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/Spravil/caption-via-translation-3_5B
  • SGLang

    How to use Spravil/caption-via-translation-3_5B 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-3_5B" \
        --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-3_5B",
    		"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-3_5B" \
            --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-3_5B",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use Spravil/caption-via-translation-3_5B with Docker Model Runner:

    docker model run hf.co/Spravil/caption-via-translation-3_5B
caption-via-translation-3_5B
6.97 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 9 commits
Spravil's picture
Spravil
Upload README.md with huggingface_hub
4284cc5 verified 7 months ago
  • .gitattributes
    1.52 kB
    initial commit 7 months ago
  • README.md
    3.19 kB
    Upload README.md with huggingface_hub 7 months ago
  • config.json
    8.5 kB
    Upload config.json with huggingface_hub 7 months ago
  • configuration_florence2.py
    16.2 kB
    Init 7 months ago
  • configuration_gemma2.py
    19.3 kB
    Init 7 months ago
  • generation_config.json
    313 Bytes
    Init 7 months ago
  • model-00001-of-00002.safetensors
    4.99 GB
    xet
    Init 7 months ago
  • model-00002-of-00002.safetensors
    1.98 GB
    xet
    Init 7 months ago
  • model.safetensors.index.json
    109 kB
    Init 7 months ago
  • modeling_florence2.py
    126 kB
    Init 7 months ago
  • modeling_gemma2.py
    95.7 kB
    Init 7 months ago
  • preprocessor_config.json
    723 Bytes
    Upload preprocessor_config.json with huggingface_hub 7 months ago
  • processing_florence2.py
    53.8 kB
    Init 7 months ago
  • tokenizer.json
    1.36 MB
    Init 7 months ago
  • tokenizer_config.json
    34 Bytes
    Init 7 months ago
  • vocab.json
    1.1 MB
    Init 7 months ago