Support GPT-2 style Conv1D layers in quantize_model

Aperta
#21 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, pytorch

Direzione di ricerca

Read src/bitsmith/nn/convert.py and src/bitsmith/calib/capture.py to see how nn.Linear conversion and calibration hooks work. Add a test that builds a tiny model from GPT2Config without downloading weights, then check that Conv1D conversion and calibration work and bitsmith hf --model gpt2 runs every config.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: models enhancement help wanted

quantize_model only converts nn.Linear. GPT-2 and some other models use
transformers.pytorch_utils.Conv1D, whose weight is stored transposed (in, out).

Task: convert Conv1D layers too (transpose the weight into a QLinear), and make
calibration hooks work for them.

Files: src/bitsmith/nn/convert.py, src/bitsmith/calib/capture.py, a test with a tiny
GPT-2 config (no download needed: build it from GPT2Config).

Done when bitsmith hf --model gpt2 runs every config.

Lingua principale
Python
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di yashwanthdevavarapu/bitsmith

Tutte le issue di yashwanthdevavarapu/bitsmith

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.