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

toxzak
/
gemma4-e2b-exp-quant

Text Generation
Transformers
quantization
sub-4-bit
sub1quant
int4
int2
gemma
gemma4
wikitext
Model card Files Files and versions
xet
Community

Instructions to use toxzak/gemma4-e2b-exp-quant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use toxzak/gemma4-e2b-exp-quant with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="toxzak/gemma4-e2b-exp-quant")
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("toxzak/gemma4-e2b-exp-quant", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use toxzak/gemma4-e2b-exp-quant with vLLM:

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

    How to use toxzak/gemma4-e2b-exp-quant 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 "toxzak/gemma4-e2b-exp-quant" \
        --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": "toxzak/gemma4-e2b-exp-quant",
    		"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 "toxzak/gemma4-e2b-exp-quant" \
            --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": "toxzak/gemma4-e2b-exp-quant",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use toxzak/gemma4-e2b-exp-quant with Docker Model Runner:

    docker model run hf.co/toxzak/gemma4-e2b-exp-quant
gemma4-e2b-exp-quant / src
50.4 kB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 1 commit
toxzak's picture
toxzak
Initial upload: mixed-budget sub-4-bit artifacts + perplexity result
9c41926 verified about 1 month ago
  • Sub1BitLLM.py
    8 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago
  • __init__.py
    1.9 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago
  • error_budget_residual.py
    19.3 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago
  • gguf_writer.py
    3.4 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago
  • groupwise_int4.py
    4.83 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago
  • lowrank_factorization.py
    2.66 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago
  • mixed_budget.py
    4.34 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago
  • pack_gguf.py
    2.98 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago
  • quantization.py
    3.02 kB
    Initial upload: mixed-budget sub-4-bit artifacts + perplexity result about 1 month ago