Downloads · 30 days
31
3% of all-time downloads
kishizaki-sci/Llama-3.3-70B-Instruct-AWQ-4bit-JP-EN
Llama-3.3-70B-Instruct-AWQ-4bit-JP-EN is a text generation model from kishizaki-sci. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Llama-3.3-70B-InstructをAutoAWQで4bit 量子化したモデル。量子化の際のキャリブレーションデータに日本語と英語を含むデータを使用。 A model of Llama-3.3-70B-Instruct quantized to 4 bits using AutoAWQ. Calibration data containing Japanese and English was used during th…
Downloads · 30 days
31
3% of all-time downloads
All-time downloads
1K
Public
Parameters
70.6B
39.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors39.8 GB · 100%
How the weights are stored.
I3268.5B · 97%
From the Hugging Face model README
Llama-3.3-70B-InstructをAutoAWQで4bit 量子化したモデル。量子化の際のキャリブレーションデータに日本語と英語を含むデータを使用。
A model of Llama-3.3-70B-Instruct quantized to 4 bits using AutoAWQ. Calibration data containing Japanese and English was used during the quantization process.
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
tokenizer = AutoTokenizer.from_pretrained("kishizaki-sci/Llama-3.3-70B-Instruct-AWQ-4bit-JP-EN")
model = AutoModelForCausalLM.from_pretrained("kishizaki-sci/Llama-3.3-70B-Instruct-AWQ-4bit-JP-EN")
model.to("cuda")
chat = [
{"role": "system", "content": "あなたは日本語で応答するAIチャットボットです。ユーザをサポートしてください。"},
{"role": "user", "content": "plotly.graph_objectsを使って散布図を作るサンプルコードを書いてください。"}
]
prompt = tokenizer.apply_chat_template(
chat,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(prompt, return_tensors="pt")
inputs = inputs.to("cuda")
streamer = TextStreamer(tokenizer)
output = model.generate(**inputs, streamer=streamer, max_new_tokens=1024)
このコードはA100インスタンスのGoogle Colab でも動かせます。
This code can also run on Google Colab with an A100 instance.
from vllm import LLM, SamplingParams
llm = LLM(
model="kishizaki-sci/Llama-3.3-70B-Instruct-AWQ-4bit-JP-EN",
tensor_parallel_size=1,
gpu_memory_utilization=0.97,
quantization="awq"
)
tokenizer = llm.get_tokenizer()
messages = [
{"role": "system", "content": "あなたは日本語で応答するAIチャットボットです。ユーザをサポートしてください。"},
{"role": "user", "content": "plotly.graph_objectsを使って散布図を作るサンプルコードを書いてください。"},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
sampling_params = SamplingParams(
temperature=0.6,
top_p=0.9,
max_tokens=1024
)
outputs = llm.generate(prompt, sampling_params)
print(outputs[0].outputs[0].text)
H100 (94GB)を1基積んだインスタンスでの実行はこちらのnotebookをご覧ください。
Please refer to this notebook for execution on an instance equipped with a single H100 (94GB).
以下のデータセットから512個のデータ,プロンプトを抽出。1つのデータのトークン数は最大350制限。
Extract 512 data points and prompts from the following dataset. The maximum token limit per data point is 350.
MIT Licenseを適用する。ただし量子化のベースモデルに適用されているLlama 3.3 Community License Agreementに従ってください。
The MIT License is applied. However, obey the Llama 3.3 Community License Agreement applied to the base model of quantization.