Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Loading quantized text encoder to CPU

オープン
#11 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
machine-learning, python, pytorch

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
2
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/Lens のほかの issue

microsoft/Lens の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。