Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

hendrydong
/
model-475m

Text Generation
Transformers
Safetensors
sdar
conversational
custom_code
Model card Files Files and versions
xet
Community

Instructions to use hendrydong/model-475m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use hendrydong/model-475m with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="hendrydong/model-475m", trust_remote_code=True)
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("hendrydong/model-475m", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use hendrydong/model-475m with vLLM:

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

    How to use hendrydong/model-475m 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 "hendrydong/model-475m" \
        --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": "hendrydong/model-475m",
    		"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 "hendrydong/model-475m" \
            --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": "hendrydong/model-475m",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use hendrydong/model-475m with Docker Model Runner:

    docker model run hf.co/hendrydong/model-475m
model-475m
955 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
hendrydong's picture
hendrydong
Upload tokenizer
f10040b verified 7 months ago
  • .gitattributes
    1.52 kB
    initial commit 7 months ago
  • README.md
    5.17 kB
    Upload SDARForCausalLM 7 months ago
  • added_tokens.json
    729 Bytes
    Upload tokenizer 7 months ago
  • chat_template.jinja
    4.12 kB
    Upload tokenizer 7 months ago
  • config.json
    1.04 kB
    Upload SDARForCausalLM 7 months ago
  • configuration_sdar.py
    11.2 kB
    Upload SDARForCausalLM 7 months ago
  • generation_config.json
    143 Bytes
    Upload SDARForCausalLM 7 months ago
  • merges.txt
    1.67 MB
    Upload tokenizer 7 months ago
  • model.safetensors
    950 MB
    xet
    Upload SDARForCausalLM 7 months ago
  • modeling_sdar.py
    40.4 kB
    Upload SDARForCausalLM 7 months ago
  • special_tokens_map.json
    774 Bytes
    Upload tokenizer 7 months ago
  • tokenization_qwen2.py
    14 kB
    Upload tokenizer 7 months ago
  • tokenizer_config.json
    5.73 kB
    Upload tokenizer 7 months ago
  • vocab.json
    3.38 MB
    Upload tokenizer 7 months ago