--- 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 - conservative library_name: transformers datasets: - wikitext widget: - text: "The capital of France is" --- # Llama 2 13B — RL-MPQ Conservative Standalone **RL-MPQ** (Reinforcement Learning Mixed-Precision Quantization) checkpoint for the **Conservative** scenario — a quantized variant of [meta-llama/Llama-2-13b-hf](https://huggingface.co/meta-llama/Llama-2-13b-hf). | Field | Value | |-------|-------| | **Base model** | [meta-llama/Llama-2-13b-hf](https://huggingface.co/meta-llama/Llama-2-13b-hf) | | **Scenario** | Conservative | | **Avg bits / weight** | 5.2 | | **Compression vs FP16** | 3.0769× | | **WikiText-2 PPL** | 4.4663 | | **Layers** | 40 | | **Bit distribution** | `{'4': 28, '8': 12}` | | **Format** | Fake-quant FP16 + `rlmpq_policy.json` | **Collection:** [RL-MPQ — Llama 2 13B](https://huggingface.co/collections/AvoCahDoe/rl-mpq-llama-2-13b-6a2b04386dd0303714a19782) — all five scenarios for Llama 2 13B. ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer repo = "AvoCahDoe/llama-2-13b-rlmpq-conservative" 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](https://huggingface.co/AvoCahDoe/llama-2-13b-rlmpq-aggressive) | 3.75 | 4.2667x | 4.5724 | | [Balanced](https://huggingface.co/AvoCahDoe/llama-2-13b-rlmpq-balanced) | 4.4 | 3.6364x | 4.4797 | | [Extreme Survival](https://huggingface.co/AvoCahDoe/llama-2-13b-rlmpq-extreme-survival) | 2.775 | 5.7658x | 6.1148 | | [High Fidelity](https://huggingface.co/AvoCahDoe/llama-2-13b-rlmpq-high-fidelity) | 6.7 | 2.3881x | 4.4313 | Grouped archive (all scenarios in one repo): [AvoCahDoe/llama-2-13b-rlmpq](https://huggingface.co/AvoCahDoe/llama-2-13b-rlmpq) ## Method 1. **Phase 3** — PPO agent assigns per-layer bit widths under the Conservative reward target. 2. **Phase 4** — Policy replayed on real weights; WikiText-2 perplexity validates quality. 3. **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 ```bibtex @misc{rlmpq_llama_2_13b_conservative_2026, title = {RL-MPQ Conservative: Llama 2 13B Mixed-Precision Quantization}, author = {AvoCahDoe}, year = {2026}, url = {https://huggingface.co/AvoCahDoe/llama-2-13b-rlmpq-conservative} } ```