Add INT3 and INT2 group codecs with packing

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
58/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python, pytorch

Research direction

Start by reading the existing 4-bit and 8-bit packing code in src/bitsmith/packing/ and how their codecs are exposed to gptq_quantize and bitsmith sqnr. Add known-layout and round trip coverage for the 3-bit and 2-bit formats, including the stated layout of eight 3-bit values in three bytes. Done means both codecs work with GPTQ and appear in bitsmith sqnr.

Written by the indexing model from the issue text.

Description

area: formats enhancement

Only 4- and 8-bit integers are packed today. 3-bit and 2-bit weights (used with GPTQ in
some low-memory setups) need their own packing: for example 8 three-bit values in 3 bytes.

Task: add pack_int3/unpack_int3 and pack_int2/unpack_int2 in
src/bitsmith/packing/, codecs int3 and int2, and make gptq_quantize usable with them.

Done when known-layout and round trip tests pass and bitsmith sqnr shows both.

Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yashwanthdevavarapu/bitsmith

All issues in yashwanthdevavarapu/bitsmith

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.