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
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

mhndayesh
/
PTD-Qwen2.5-0.5B-Keep70-Variant

Text Generation
Transformers
English
ptd_qwen2
ptd
sparse-transformer
qwen2
long-context
custom-code
custom_code
Model card Files Files and versions
xet
Community

Instructions to use mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant with vLLM:

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

    How to use mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant 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 "mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant" \
        --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": "mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant",
    		"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 "mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant" \
            --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": "mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant with Docker Model Runner:

    docker model run hf.co/mhndayesh/PTD-Qwen2.5-0.5B-Keep70-Variant
PTD-Qwen2.5-0.5B-Keep70-Variant
988 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 5 commits
mhndayesh's picture
mhndayesh
Update model card and clean package artifacts
13a1087 verified 3 months ago
  • .gitattributes
    42 Bytes
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • README.md
    1.85 kB
    Update model card and clean package artifacts 3 months ago
  • __init__.py
    161 Bytes
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • config.json
    2.36 kB
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • configuration_ptd_qwen2.py
    783 Bytes
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • hf_ptd_loader.py
    2.93 kB
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • model.py
    28.8 kB
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • modeling_ptd_qwen2.py
    5.96 kB
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • ptd_model_state.pt

    Detected Pickle imports (3)

    • "collections.OrderedDict",
    • "torch.BFloat16Storage",
    • "torch._utils._rebuild_tensor_v2"

    What is a pickle import?

    988 MB
    xet
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • ptd_package_config.json
    724 Bytes
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago
  • requirements.txt
    55 Bytes
    Upload PTD Qwen2.5-0.5B keep70 variant package 3 months ago