Loading quantized text encoder to CPU
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- ai, machine-learning
Direzione di ricerca
Start by reviewing the linked diffusers pull request comment and locating Lens's quantized model-loading and device-transfer path. Determine whether the existing model-loading code can retain the quantized representation on CPU and move it to GPU on demand. Done means documenting or implementing that flow and verifying CPU/GPU transfers without the reported 40 GB RAM expansion; the issue does not identify specific repository files or tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is the issue I have noted here https://github.com/huggingface/diffusers/pull/13837#issuecomment-4614858152 correct:
GPT-OSS is a 20B model that comes pre-quantized to mxfp4 for most of its parameters. If you load it to CPU using the Microsoft/transformer upstream code, it gets automatically dequantized, using 40 GB of RAM - but then it also requires 40 GB of VRAM when you move it to GPU.
If you load it to GPU, it materializes on GPU as 10 GB of VRAM using the kernels library - but it cannot be moved to CPU then.
It doesn't seem to be possible to load the model quantized to CPU, and move it on demand.
How do you handle this in this PR? diffusers might need some new infrastructure for this case, otherwise the vram-saving optimizations that diffusers have will fail.
I have settled for on-demand loading and discard-after-use for now, to avoid the 40 GB ram.
Would it be possible to load the quantized text model to CPU and just move it to GPU and back?
Many software packages do or a allow this with other models for consumer hardware, including Comfy, diffusers and OneTrainer
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/Lens
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 12/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
-
Release full TextEncoderAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di microsoft/Lens
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws-samples/sample-per-model-bedrock#464 ·
I maintainer di solito rispondono entro 1 giorno
-
lesson-submission pending-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
Ikalus1988/MisakaNet#3789 ·
I maintainer di solito rispondono entro 1 giorno
-
Python Volcengine provider returns failures instead of raising themForse già presa @Ricardo-M-L l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
agent-infra/sandbox#248 ·
-
[Bug] cloud JSON directory loading assumes a Key field in fsspec listingsForse già presa @Ricardo-M-L l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
hiyouga/LlamaFactory#10910 ·
I maintainer di solito rispondono entro 1 giorno
-
Bundled uv is never updated and trusts the compromised eMudhra certificatesForse già presa @FabienDanieau l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100