🚀 Heron GIT Japanese StableLM Base 7B
Heron GIT Japanese StableLM Base 7Bは、入力された画像について会話できるビジョン言語モデルです。画像キャプショニングやVQAなどのタスクに役立ちます。

🚀 クイックスタート
Heron GIT Japanese StableLM Base 7Bを使用するには、まずインストールガイドに従ってください。
✨ 主な機能
- 入力された画像に関する会話が可能です。
- 画像キャプショニングやVQAなどのタスクに対応しています。
📦 インストール
インストールガイドに従ってインストールしてください。
💻 使用例
基本的な使用法
import requests
from PIL import Image
import torch
from transformers import AutoProcessor
from heron.models.git_llm.git_japanese_stablelm_alpha import GitJapaneseStableLMAlphaForCausalLM
device_id = 0
model = GitJapaneseStableLMAlphaForCausalLM.from_pretrained(
'turing-motors/heron-chat-git-ja-stablelm-base-7b-v0', torch_dtype=torch.float16
)
model.eval()
model.to(f"cuda:{device_id}")
processor = AutoProcessor.from_pretrained('turing-motors/heron-chat-git-ja-stablelm-base-7b-v0')
url = "https://www.barnorama.com/wp-content/uploads/2016/12/03-Confusing-Pictures.jpg"
image = Image.open(requests.get(url, stream=True).raw)
text = f"##human: これは何の写真ですか?\n##gpt: "
inputs = processor(
text,
image,
return_tensors="pt",
truncation=True,
)
inputs = {k: v.to(f"cuda:{device_id}") for k, v in inputs.items()}
eos_token_id_list = [
processor.tokenizer.pad_token_id,
processor.tokenizer.eos_token_id,
]
with torch.no_grad():
out = model.generate(**inputs, max_length=256, do_sample=False, temperature=0., eos_token_id=eos_token_id_list)
print(processor.tokenizer.batch_decode(out)[0])
📚 ドキュメント
モデルの詳細
学習について
このモデルは、まずAdaptorを使用してSTAIR Captionsで学習されました。第2段階では、LoRAを使用してLLaVA-Instruct-150K-JAとJapanese Visual Genomeでファインチューニングされました。
学習データセット
使用目的と制限事項
使用目的
このモデルは、チャットアプリケーションや研究目的での使用を想定しています。
制限事項
このモデルは不正確または誤った情報を生成する可能性があり、その精度は保証されません。まだ研究開発段階にあります。
🔧 技術詳細
このモデルは、the heron libraryを使用して学習されています。詳細はコードを参照してください。
📄 ライセンス
このモデルはCC BY-NC 4.0ライセンスの下で提供されています。
引用方法
@misc{GitJapaneseStableLM,
url = {[https://huggingface.co/turing-motors/heron-chat-git-ja-stablelm-base-7b-v0](https://huggingface.co/turing-motors/heron-chat-git-ja-stablelm-base-7b-v0)},
title = {Heron GIT Japanese StableLM Base 7B},
author = {Yuichi Inoue, Kotaro Tanahashi, and Yu Yamaguchi}
}
関連文献の引用
@misc{JapaneseInstructBLIPAlpha,
url = {[https://huggingface.co/stabilityai/japanese-instructblip-alpha](https://huggingface.co/stabilityai/japanese-instructblip-alpha)},
title = {Japanese InstructBLIP Alpha},
author = {Shing, Makoto and Akiba, Takuya}
}