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

codewithdark
/
Llama-3.2-1B-4bit-gptq

Text Generation
Transformers
English
llama
Quantize
4-bit precision
gptq
Model card Files Files and versions
xet
Community

Instructions to use codewithdark/Llama-3.2-1B-4bit-gptq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use codewithdark/Llama-3.2-1B-4bit-gptq with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="codewithdark/Llama-3.2-1B-4bit-gptq")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("codewithdark/Llama-3.2-1B-4bit-gptq")
    model = AutoModelForCausalLM.from_pretrained("codewithdark/Llama-3.2-1B-4bit-gptq")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use codewithdark/Llama-3.2-1B-4bit-gptq with vLLM:

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

    How to use codewithdark/Llama-3.2-1B-4bit-gptq 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 "codewithdark/Llama-3.2-1B-4bit-gptq" \
        --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": "codewithdark/Llama-3.2-1B-4bit-gptq",
    		"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 "codewithdark/Llama-3.2-1B-4bit-gptq" \
            --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": "codewithdark/Llama-3.2-1B-4bit-gptq",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use codewithdark/Llama-3.2-1B-4bit-gptq with Docker Model Runner:

    docker model run hf.co/codewithdark/Llama-3.2-1B-4bit-gptq
Llama-3.2-1B-4bit-gptq
1.58 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
codewithdark's picture
codewithdark
Create README.md
f7923c1 verified 11 months ago
  • .gitattributes
    1.57 kB
    Add 4-bit GPTQ model quantized from meta-llama/Llama-3.2-1B (2025-06-25 10:08:23) 11 months ago
  • README.md
    147 Bytes
    Create README.md 11 months ago
  • config.json
    1.15 kB
    Add 4-bit GPTQ model quantized from meta-llama/Llama-3.2-1B (2025-06-25 10:08:23) 11 months ago
  • gptq_model-4bit-128g.safetensors
    1.56 GB
    xet
    Add 4-bit GPTQ model quantized from meta-llama/Llama-3.2-1B (2025-06-25 10:08:23) 11 months ago
  • quant_config.json
    80 Bytes
    Add 4-bit GPTQ model quantized from meta-llama/Llama-3.2-1B (2025-06-25 10:08:23) 11 months ago
  • quantize_config.json
    265 Bytes
    Add 4-bit GPTQ model quantized from meta-llama/Llama-3.2-1B (2025-06-25 10:08:23) 11 months ago
  • special_tokens_map.json
    301 Bytes
    Add 4-bit GPTQ model quantized from meta-llama/Llama-3.2-1B (2025-06-25 10:08:23) 11 months ago
  • tokenizer.json
    17.2 MB
    xet
    Add 4-bit GPTQ model quantized from meta-llama/Llama-3.2-1B (2025-06-25 10:08:23) 11 months ago
  • tokenizer_config.json
    50.5 kB
    Add 4-bit GPTQ model quantized from meta-llama/Llama-3.2-1B (2025-06-25 10:08:23) 11 months ago