はじめに 準備 推論 モデルのロード プロンプトから推論 結果 はじめに 準備 !pip install torch !pip install transformers !pip install sentencepiece !pip install accelerate !pip install protobuf 推論 モデルのロード import torch from transformers import AutoTokenizer, AutoModelForCausalLM model_name = "tokyotech-llm/Swallow-7b-instruct-hf" token…