jkim96 commited on
Commit
0cb768d
·
verified ·
1 Parent(s): 49c9c8e

Add DASH-Q remote-code inference (Triton decode kernel)

Browse files
Files changed (1) hide show
  1. README.md +11 -17
README.md CHANGED
@@ -16,8 +16,6 @@ tags:
16
  > **DASH-Q** — Diagonal-Aware Shrinkage for Robust PTQ.
17
  > `INT3` · group size 128 · **17.4800 GB** (from 71.9039 GB — **4.1x smaller**)
18
 
19
- This checkpoint runs directly with Transformers: the packed quantized layers and a Triton decode kernel are bundled in the repository, so no additional package is needed.
20
-
21
  ## Usage
22
 
23
  ```python
@@ -34,23 +32,19 @@ inputs = tokenizer(text, return_tensors="pt").to(model.device)
34
  print(tokenizer.decode(model.generate(**inputs, max_new_tokens=256)[0]))
35
  ```
36
 
37
- No extra package is required: this repository carries its own inference code
38
- (`modeling_dashq.py`) and a Triton weight-only GEMV decode kernel
39
- (`dashq_kernel.py`). Quantized layers are rebuilt from `dashq_config.json` at load
40
- time and converted to the kernel automatically; on CPU or without Triton the model
41
- falls back to a PyTorch dequantize-and-matmul path.
42
-
43
- Requirements: `transformers`, `torch`, and `triton` (bundled with CUDA builds of
44
- PyTorch). The [DASH-Q repository](https://github.com/JaeminK/dashq) is only needed
45
- to quantize your own models.
46
 
47
- ### Runtime format
48
 
49
- | Field | Value |
50
- | --- | --- |
51
- | Weights | group-wise asymmetric integers (3-bit, group size 128) packed into int32 words |
52
- | Decode kernel | Triton K-major GEMV (supports 2/3/4/8-bit at any group size) |
53
- | Prefill | unpack-and-matmul on the same buffers |
 
54
 
55
  ## Quantization
56
 
 
16
  > **DASH-Q** — Diagonal-Aware Shrinkage for Robust PTQ.
17
  > `INT3` · group size 128 · **17.4800 GB** (from 71.9039 GB — **4.1x smaller**)
18
 
 
 
19
  ## Usage
20
 
21
  ```python
 
32
  print(tokenizer.decode(model.generate(**inputs, max_new_tokens=256)[0]))
33
  ```
34
 
35
+ `trust_remote_code=True` is required: the checkpoint ships the quantized-layer
36
+ implementation (`modeling_dashq.py`) and a Triton weight-only GEMV decode kernel
37
+ (`dashq_kernel.py`). Without Triton or on CPU the model falls back to a PyTorch
38
+ dequantize-and-matmul path.
 
 
 
 
 
39
 
40
+ ### Requirements
41
 
42
+ | Package | Minimum | Verified with |
43
+ | --- | --- | --- |
44
+ | `torch` | 2.4 | 2.12.1+cu130 |
45
+ | `transformers` | 5.8 | 5.9.0 |
46
+ | `triton` | 3.0 (Linux; bundled with CUDA builds of PyTorch) | 3.7.1 |
47
+ | `huggingface_hub` | 1.5 (pulled in by transformers) | 1.15.0 |
48
 
49
  ## Quantization
50