Text Generation
Transformers
Safetensors
English
llama
llama-2
rl-mpq
mixed-precision
quantization
fake-quantization
high-fidelity
text-generation-inference
Instructions to use AvoCahDoe/llama-2-13b-rlmpq-high-fidelity with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AvoCahDoe/llama-2-13b-rlmpq-high-fidelity with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AvoCahDoe/llama-2-13b-rlmpq-high-fidelity")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AvoCahDoe/llama-2-13b-rlmpq-high-fidelity") model = AutoModelForCausalLM.from_pretrained("AvoCahDoe/llama-2-13b-rlmpq-high-fidelity", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AvoCahDoe/llama-2-13b-rlmpq-high-fidelity with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AvoCahDoe/llama-2-13b-rlmpq-high-fidelity" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AvoCahDoe/llama-2-13b-rlmpq-high-fidelity", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AvoCahDoe/llama-2-13b-rlmpq-high-fidelity
- SGLang
How to use AvoCahDoe/llama-2-13b-rlmpq-high-fidelity 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 "AvoCahDoe/llama-2-13b-rlmpq-high-fidelity" \ --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": "AvoCahDoe/llama-2-13b-rlmpq-high-fidelity", "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 "AvoCahDoe/llama-2-13b-rlmpq-high-fidelity" \ --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": "AvoCahDoe/llama-2-13b-rlmpq-high-fidelity", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AvoCahDoe/llama-2-13b-rlmpq-high-fidelity with Docker Model Runner:
docker model run hf.co/AvoCahDoe/llama-2-13b-rlmpq-high-fidelity
metadata
license: llama2
base_model: meta-llama/Llama-2-13b-hf
pipeline_tag: text-generation
language:
- en
tags:
- llama-2
- text-generation
- rl-mpq
- mixed-precision
- quantization
- fake-quantization
- high-fidelity
library_name: transformers
datasets:
- wikitext
widget:
- text: The capital of France is
Llama 2 13B β RL-MPQ High Fidelity
Standalone RL-MPQ (Reinforcement Learning Mixed-Precision Quantization) checkpoint for the High Fidelity scenario β a quantized variant of meta-llama/Llama-2-13b-hf.
| Field | Value |
|---|---|
| Base model | meta-llama/Llama-2-13b-hf |
| Scenario | High Fidelity |
| Avg bits / weight | 6.7 |
| Compression vs FP16 | 2.3881Γ |
| WikiText-2 PPL | 4.4313 |
| Layers | 40 |
| Bit distribution | {'4': 13, '8': 27} |
| Format | Fake-quant FP16 + rlmpq_policy.json |
Collection: RL-MPQ β Llama 2 13B β all five scenarios for Llama 2 13B.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "AvoCahDoe/llama-2-13b-rlmpq-high-fidelity"
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="float16")
tokenizer = AutoTokenizer.from_pretrained(repo)
Other Llama 2 13B scenarios
| Scenario | Avg bits | Compression | WikiText-2 PPL |
|---|---|---|---|
| Aggressive | 3.75 | 4.2667x | 4.5724 |
| Balanced | 4.4 | 3.6364x | 4.4797 |
| Conservative | 5.2 | 3.0769x | 4.4663 |
| Extreme Survival | 2.775 | 5.7658x | 6.1148 |
Grouped archive (all scenarios in one repo): AvoCahDoe/llama-2-13b-rlmpq
Method
- Phase 3 β PPO agent assigns per-layer bit widths under the High Fidelity reward target.
- Phase 4 β Policy replayed on real weights; WikiText-2 perplexity validates quality.
- Export β Fake-quantized FP16 weights compatible with Hugging Face Transformers.
Files
| File | Description |
|---|---|
config.json |
Llama architecture + RL-MPQ metadata |
model.safetensors |
Fake-quantized weights |
rlmpq_policy.json |
Per-layer bit-width policy |
rlmpq_metrics.json |
Validation & PPL summary |
Citation
@misc{rlmpq_llama_2_13b_high-fidelity_2026,
title = {RL-MPQ High Fidelity: Llama 2 13B Mixed-Precision Quantization},
author = {AvoCahDoe},
year = {2026},
url = {https://huggingface.co/AvoCahDoe/llama-2-13b-rlmpq-high-fidelity}
}