Downloads · 30 days
50
19% of all-time downloads
marcusmi4n/abeja-qwen2.5-7b-japanese-quantized
abeja-qwen2.5-7b-japanese-quantized is a text generation model from marcusmi4n. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository contains the ABEJA Qwen 2.5 7B Japanese model quantized to 4-bit NF4 for efficient inference. The model has been optimized to reduce memory usage by 75% while maintaining high-quality Japanese and Engl…
Downloads · 30 days
50
19% of all-time downloads
All-time downloads
260
Public
Parameters
7.6B
5.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.5 GB · 100%
How the weights are stored.
U86.7B · 86%
From the Hugging Face model README
This repository contains the ABEJA Qwen 2.5 7B Japanese model quantized to 4-bit NF4 for efficient inference. The model has been optimized to reduce memory usage by 75% while maintaining high-quality Japanese and English text generation capabilities.
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained('marcusmi4n/abeja-qwen2.5-7b-japanese-quantized')
tokenizer = AutoTokenizer.from_pretrained('marcusmi4n/abeja-qwen2.5-7b-japanese-quantized')
# Japanese text generation
inputs = tokenizer('こんにちは、私は', return_tensors='pt')
outputs = model.generate(**inputs, max_length=100, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# English text generation
inputs = tokenizer('Hello, I am', return_tensors='pt')
outputs = model.generate(**inputs, max_length=100, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
pip install transformers torch accelerate
このリポジトリには、効率的な推論のために4ビットNF4に量子化されたABEJA Qwen 2.5 7B日本語モデルが含まれています。このモデルは、高品質な日本語および英語テキスト生成機能を維持しながら、メモリ使用量を75%削減するように最適化されています。
from transformers import AutoModelForCausalLM, AutoTokenizer
# モデルとトークナイザーを読み込み
model = AutoModelForCausalLM.from_pretrained('marcusmi4n/abeja-qwen2.5-7b-japanese-quantized')
tokenizer = AutoTokenizer.from_pretrained('marcusmi4n/abeja-qwen2.5-7b-japanese-quantized')
# 日本語テキスト生成
inputs = tokenizer('こんにちは、私は', return_tensors='pt')
outputs = model.generate(**inputs, max_length=100, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# 英語テキスト生成
inputs = tokenizer('Hello, I am', return_tensors='pt')
outputs = model.generate(**inputs, max_length=100, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
pip install transformers torch accelerate
Author: Mukwaya Mark