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

  • Log In
  • Sign Up

pcuenq
/
Hunyuan-7B-Instruct-tokenizer

Text Generation
Transformers
hunyuan
conversational
custom_code
3-bit
Model card Files Files and versions
xet
Community
3

Instructions to use pcuenq/Hunyuan-7B-Instruct-tokenizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use pcuenq/Hunyuan-7B-Instruct-tokenizer with Transformers:

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

    How to use pcuenq/Hunyuan-7B-Instruct-tokenizer with vLLM:

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

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

    How to use pcuenq/Hunyuan-7B-Instruct-tokenizer with Docker Model Runner:

    docker model run hf.co/pcuenq/Hunyuan-7B-Instruct-tokenizer
Hunyuan-7B-Instruct-tokenizer
Ctrl+K
Ctrl+K
  • 1 contributor
History: 7 commits
pcuenq's picture
pcuenq HF Staff
Update README.md
915ca05 verified 10 months ago
  • .gitattributes
    1.57 kB
    Upload tokenizer 10 months ago
  • README.md
    2.52 kB
    Update README.md 10 months ago
  • chat_template.jinja
    766 Bytes
    Upload tokenizer 10 months ago
  • config.json
    3.13 kB
    config.json (#1) 10 months ago
  • special_tokens_map.json
    3 Bytes
    Upload tokenizer 10 months ago
  • tokenizer.json
    16.4 MB
    xet
    Upload tokenizer 10 months ago
  • tokenizer_config.json
    37.9 kB
    Upload tokenizer 10 months ago