-
Notifications
You must be signed in to change notification settings - Fork 0
推論ファイルの準備
Koki Maeda edited this page Oct 22, 2024
·
2 revisions
- 本リポジトリでは,推論を行うモデルを明示的にはサポートしない.
- ただし,
examples/{model_name}.py
において,我々がベースラインとしたモデルのベンチマーク計測に用いた推論方法を提示している.
- ただし,
-
{model_name}.py
は,VLM
クラスの中に以下の関数を持っていればよい.
class VLM:
model_id: str = "{model_name}"
def __init__(self) -> None:
# モデルの初期化
def generate(self, images: Union[Image.Image, list[Image.Image]], text: str, max_new_tokens: int = 256):
# モデルの生成部分.画像は複数枚,もしくは1枚で与えられることに注意.
- 現状全てのモデルで利用できるわけではない
- 新規モデル導入時に
vllm
利用を考慮する