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

staghado
/
lightonocr-ft-iam-1ep

Text Generation
Transformers
Safetensors
lightonocr
Generated from Trainer
conversational
Model card Files Files and versions
xet
Community

Instructions to use staghado/lightonocr-ft-iam-1ep with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use staghado/lightonocr-ft-iam-1ep with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="staghado/lightonocr-ft-iam-1ep")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoModelForSeq2SeqLM
    model = AutoModelForSeq2SeqLM.from_pretrained("staghado/lightonocr-ft-iam-1ep", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use staghado/lightonocr-ft-iam-1ep with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "staghado/lightonocr-ft-iam-1ep"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "staghado/lightonocr-ft-iam-1ep",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/staghado/lightonocr-ft-iam-1ep
  • SGLang

    How to use staghado/lightonocr-ft-iam-1ep 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 "staghado/lightonocr-ft-iam-1ep" \
        --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": "staghado/lightonocr-ft-iam-1ep",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    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 "staghado/lightonocr-ft-iam-1ep" \
            --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": "staghado/lightonocr-ft-iam-1ep",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use staghado/lightonocr-ft-iam-1ep with Docker Model Runner:

    docker model run hf.co/staghado/lightonocr-ft-iam-1ep
lightonocr-ft-iam-1ep
2.34 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 7 commits
staghado's picture
staghado
staghado/LightOnOCR-1B-1025-ft-iam
3f89217 verified 10 months ago
  • .gitattributes
    1.57 kB
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • README.md
    1.8 kB
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • added_tokens.json
    707 Bytes
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • chat_template.jinja
    963 Bytes
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • config.json
    2.31 kB
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • generation_config.json
    216 Bytes
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • merges.txt
    1.67 MB
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • model.safetensors
    2.32 GB
    xet
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • processor_config.json
    999 Bytes
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • special_tokens_map.json
    613 Bytes
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • tokenizer.json
    11.4 MB
    xet
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • tokenizer_config.json
    5.45 kB
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • training_args.bin
    5.14 kB
    xet
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago
  • vocab.json
    2.78 MB
    staghado/LightOnOCR-1B-1025-ft-iam 10 months ago