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- text-generation
|
| 8 |
+
- conversational
|
| 9 |
+
- compressed-tensors
|
| 10 |
+
- awq
|
| 11 |
+
- w4a16
|
| 12 |
+
- int8
|
| 13 |
+
- quantized
|
| 14 |
+
base_model: TheDrummer/Fallen-Command-A-111B-v1
|
| 15 |
+
base_model_relation: quantized
|
| 16 |
+
quantized_by: TheHouseOfTheDude
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# Fallen-Command-A-111B-v1 — **Quantized** (compressed-tensors for vLLM)
|
| 20 |
+
|
| 21 |
+
This repository provides **quantized runtime packages** of
|
| 22 |
+
**[TheDrummer/Fallen-Command-A-111B-v1](https://huggingface.co/TheDrummer/Fallen-Command-A-111B-v1)**, a finetune of
|
| 23 |
+
**[CohereLabs/c4ai-command-a-03-2025](https://huggingface.co/CohereLabs/c4ai-command-a-03-2025)** (aka **Command A**), repackaged for **vLLM** using the **compressed‑tensors** format.
|
| 24 |
+
|
| 25 |
+
> **TL;DR**
|
| 26 |
+
> - **This repo is quantized** with branches **W4A16** and **W8A16**.
|
| 27 |
+
> - Load with **vLLM** using `--quantization compressed-tensors`.
|
| 28 |
+
> - Command A (111B) is a **dense**, enterprise‑oriented model with **256K context**, high throughput, and strong capabilities for **tool use, agents, RAG, and multilingual** tasks.
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## Revisions & Branches
|
| 33 |
+
|
| 34 |
+
> The **`main`** branch is a **landing page** (model card + links). All runnable artifacts live under per‑revision branches.
|
| 35 |
+
|
| 36 |
+
- **main** — placeholder / landing page
|
| 37 |
+
- **W4A16** — 4‑bit weights / 16‑bit activations builds and runtime assets
|
| 38 |
+
- **W8A16** — 8‑bit weights / 16‑bit activations builds
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## Repository Contents (per revision)
|
| 43 |
+
|
| 44 |
+
- **Sharded quantized weights** in `.safetensors` with an index (`model.safetensors.index.json`)
|
| 45 |
+
- `config.json` including **compressed‑tensors** metadata (`weight_format`, `quantization`, `quantization_config`)
|
| 46 |
+
- Tokenizer artifacts (`tokenizer.json`, `tokenizer.model`, etc.)
|
| 47 |
+
- Optional: `chat_template.jinja` (inherits the parent finetune’s chat format)
|
| 48 |
+
|
| 49 |
+
> Exact files can differ by branch; see the **Files and versions** tab for each revision.
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
## About **Command A** (how it differs from Qwen/Qwen3 and others)
|
| 54 |
+
|
| 55 |
+
- **Dense 111B** (not MoE): All parameters are active at inference; optimized for **throughput** and **enterprise reliability**.
|
| 56 |
+
- **256K context**: supports very long conversations and documents.
|
| 57 |
+
- **Enterprise agentic focus**: excels at **tool use**, **RAG**, **agents**, and **multilingual** tasks.
|
| 58 |
+
- **Efficiency**: designed for high tokens/sec and practical deployment footprints compared to similarly strong models.
|
| 59 |
+
|
| 60 |
+
> See the Command A resources for details (technical report, model card, and product docs).
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
+
## Quantization recipe & implementation notes (from the attached script)
|
| 65 |
+
|
| 66 |
+
The **W4A16** builds in this repo were produced with a modern **AWQ** recipe via **llm‑compressor** (AutoAWQ successor). Key choices:
|
| 67 |
+
|
| 68 |
+
- **Scheme**: **W4A16**, **symmetric** INT4 weights, **group_size=128** targeting **Linear** layers.
|
| 69 |
+
- **Ignored**: `lm_head` left in higher precision.
|
| 70 |
+
- **Calibration data**: `wikitext-2-raw-v1` **train[:256]**, shuffled, preprocessed to `text`.
|
| 71 |
+
- **Calibration setup**: `num_calibration_samples=128`, `max_seq_length=256`.
|
| 72 |
+
- **Orchestration**: uses `oneshot()` to stream layers—**no manual device map / offloading**; relies on llm‑compressor’s memory management.
|
| 73 |
+
- **Export**: saved with `save_compressed=True` to include **compressed‑tensors** runtime metadata for vLLM.
|
| 74 |
+
- **Runtime dtype**: activations served in **BF16/FP16** (A16) at inference.
|
| 75 |
+
|
| 76 |
+
The **INT8‑W8A16** branch follows the same structure, trading slightly higher memory for extra stability on some workloads.
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## Quickstart — vLLM (compressed‑tensors)
|
| 81 |
+
|
| 82 |
+
Install vLLM (recent version recommended):
|
| 83 |
+
|
| 84 |
+
```bash
|
| 85 |
+
pip install vllm
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
Serve (adjust to your hardware):
|
| 89 |
+
|
| 90 |
+
```bash
|
| 91 |
+
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 vllm serve TheHouseOfTheDude/Fallen-Command-A-111B-v1_Compressed-Tensors --quantization compressed-tensors --tensor-parallel-size 8 --max-model-len 256000 --gpu-memory-utilization 0.70 --dtype bfloat16
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
Query via **Chat Completions**:
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
|
| 98 |
+
"model": "TheHouseOfTheDude/Fallen-Command-A-111B-v1_Compressed-Tensors",
|
| 99 |
+
"messages": [
|
| 100 |
+
{"role":"system","content":"You are Command-A (finetuned), helpful, precise, and safe."},
|
| 101 |
+
{"role":"user","content":"Outline a retrieval pipeline for multilingual legal documents."}
|
| 102 |
+
],
|
| 103 |
+
"max_tokens": 512,
|
| 104 |
+
"temperature": 0.7,
|
| 105 |
+
"top_p": 0.95
|
| 106 |
+
}'
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
> **Note:** `compressed‑tensors` is a **vLLM runtime format**. Loading this artifact directly in vanilla 🤗 Transformers is not supported; use vLLM for inference. For Transformers, use a different export (e.g., GPTQ/AWQ compatible) or full‑precision weights.
|
| 110 |
+
|
| 111 |
+
---
|
| 112 |
+
|
| 113 |
+
## Prompting / Chat Template
|
| 114 |
+
|
| 115 |
+
This package follows the parent finetune’s **chat** conventions. If a `chat_template.jinja` is present in the branch, `apply_chat_template` will use it automatically.
|
| 116 |
+
|
| 117 |
+
---
|
| 118 |
+
|
| 119 |
+
## Lineage
|
| 120 |
+
|
| 121 |
+
- **Base model:** [CohereLabs/c4ai-command-a-03-2025](https://huggingface.co/CohereLabs/c4ai-command-a-03-2025)
|
| 122 |
+
- **Finetuned parent:** [TheDrummer/Fallen-Command-A-111B-v1](https://huggingface.co/TheDrummer/Fallen-Command-A-111B-v1)
|
| 123 |
+
- **This repo:** **Quantized child** of the finetune (**compressed‑tensors** for vLLM)
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
## Hardware & Tips (rule‑of‑thumb)
|
| 128 |
+
|
| 129 |
+
- 111B dense models typically require **multi‑GPU** deployments for best throughput.
|
| 130 |
+
- Long contexts are **KV‑cache** heavy—tune `--max-model-len` and batch size.
|
| 131 |
+
- Prefer **BF16** on GPUs with native support; otherwise **FP16**.
|
| 132 |
+
- Consider CUDA Graphs if stable in your stack.
|
| 133 |
+
|
| 134 |
+
---
|
| 135 |
+
|
| 136 |
+
## License & Usage
|
| 137 |
+
|
| 138 |
+
This distribution inherits the licenses/policies of the **finetuned parent** and its **base** model.
|
| 139 |
+
Use of the model constitutes acceptance of the upstream terms.
|
| 140 |
+
|
| 141 |
+
---
|
| 142 |
+
|
| 143 |
+
## Changelog
|
| 144 |
+
|
| 145 |
+
- **v1 (current)** — Quantized compressed‑tensors exports for Fallen‑Command‑A‑111B‑v1; added **W4A16** and **INT8‑W8A16** branches; model card set for **Quantized** classification.
|