Instructions to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF", filename="EZO-gemma-2-2b-jpn-it.Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with Ollama:
ollama run hf.co/QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
- Unsloth Studio
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.EZO-gemma-2-2b-jpn-it-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/EZO-gemma-2-2b-jpn-it-GGUF
This is quantized version of AXCXEPT/EZO-gemma-2-2b-jpn-it created using llama.cpp
Original Model Card
[AXCXEPT/EZO-gemma-2-2b-jpn-it]
[Model Information]
This model is based on google/gemma-2-2b-jpn-it, enhanced with multiple tuning techniques to improve its general performance. While it excels in Japanese language tasks, it's designed to meet diverse needs globally.
google/gemma-2-2b-jpn-itใใใผในใจใใฆใ่คๆฐใฎใใฅใผใใณใฐๆๆณใๆก็จใฎใใใๆฑ็จ็ใซๆง่ฝใๅไธใใใใขใใซใงใใๆฅๆฌ่ชใฟในใฏใซๅชใใคใคใไธ็ไธญใฎๅคๆงใชใใผใบใซๅฟใใ่จญ่จใจใชใฃใฆใใพใใ
[Benchmark Results]
Terms of Use: Terms
This model is based on google/gemma-2-2b-jpn-it and is subject to the Gemma Terms of Use. For detailed information, please refer to the official Gemma license page.
ใใฎใขใใซใฏgoogle/gemma-2-2b-jpn-itใใใผในใซใใฆใใใGemmaใฎๅฉ็จ่ฆ็ดใซๅพใใพใใ่ฉณ็ดฐใซใคใใฆใฏใGemmaใฎๅ ฌๅผใฉใคใปใณในใใผใธใใๅ็ งใใ ใใใ
[Usage]
Here are some code snippets to quickly get started with the model. First, run:
pip install -U transformers accelerate
Then, copy the snippet from the relevant section for your use case.
ไปฅไธใซใใขใใซใฎๅฎ่กใ็ด ๆฉใ้ๅงใใใใใฎใณใผใในใใใใใใใใคใ็ดนไปใใพใใ
ใพใใ
pip install -U transformers
ใๅฎ่กใใไฝฟ็จไพใซ้ข้ฃใใใปใฏใทใงใณใฎในใใใใใใณใใผใใฆใใ ใใใ
[Chat Template]
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "AXCXEPT/EZO-gemma-2-2b-jpn-it"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
)
messages = [
{"role": "user", "content": f"""
ไปฅไธใฎ่จไบใใๆฅไปใใในใฆๆฝๅบใใใ
ใใใใไปๅฌไธ็ชใฎๅฏๆณข โ10ๅนดใซไธๅบฆใฎไฝๆธฉใซโ ๅคง้ชใซๅใใ
ใใฎๅฌไธ็ชใฎ้ๅธธใซๅผทใๅฏๆฐใๆตใ่พผใใใใ24ๆฅใใๅๆฅๆฌใใ่ฅฟๆฅๆฌใฎๆฅๆฌๆตทๅดใงๅคง้ชใ็ๅน้ชใจใชใใปใใใตใ ใ้ชใฎๅฐใชใๅคชๅนณๆดๅดใฎๅนณๅฐใงใๅคง้ชใจใชใใใใใใใใพใใ
ๅ
จๅฝ็ใซ10ๅนดใซไธๅบฆ็จๅบฆใฎไฝใๆฐๆธฉใซใชใ่ฆ่พผใฟใงใ่ทฏ้ขใๆฐด้็ฎกใฎๅ็ตใซใใ่ขซๅฎณใๅบใใใใใใใใพใใไบๅฎใฎๅคๆดใๆค่จใใใชใฉใๅคง้ชใไฝๆธฉใธใฎๅใใ้ฒใใฆใใ ใใใ
ๆฐ่ฑกๅบใซใใใพใใจใๆฅๆฌไป่ฟใฏ24ๆฅใใ26ๆฅ ๆจๆๆฅใใใซใใใฆๅฌๅใฎๆฐๅง้
็ฝฎใๅผทใพใใๅๆฅๆฌใใ่ฅฟๆฅๆฌใฎไธ็ฉบใซใฏใใใฎๅฌไธ็ชใฎ้ๅธธใซๅผทใๅฏๆฐใๆตใ่พผใ่ฆ่พผใฟใงใใ
ใใฎใใใๅๆฅๆฌใใ่ฅฟๆฅๆฌใฎๆฅๆฌๆตทๅดใไธญๅฟใซๅคง้ชใ็ๅน้ชใจใชใใ็ญๆ้ใง็ฉ้ชใๆฅๆฟใซๅขใใใใใใใใใพใใ
"""},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=512)
print(tokenizer.decode(outputs[0]))
[Template]
<bos><start_of_turn>user
Write a hello world program<end_of_turn>
<start_of_turn>model
XXXXXX<end_of_turn><eos>
[Model Data]
Training Dataset]
We extracted high-quality data from Japanese Wikipedia and FineWeb to create instruction data. Our innovative training approach allows for performance improvements across various languages and domains, making the model suitable for global use despite its focus on Japanese data.
ๆฅๆฌ่ชใฎWikiใใผใฟใใใณใFineWebใใ่ฏ่ณชใชใใผใฟใฎใฟใๆฝๅบใใInstructionใใผใฟใไฝๆใใพใใใใใฎใขใใซใงใฏๆฅๆฌ่ชใซ็นๅใใใฆใใพใใใไธ็ไธญใฎใฉใใชใฆใผในใฑใผในใงใๅฉ็จๅฏ่ฝใชใขใใญใผใใงใใ
https://huggingface.co/datasets/legacy-datasets/wikipedia https://huggingface.co/datasets/HuggingFaceFW/fineweb
Data Preprocessing
We used a plain instruction tuning method to train the model on exemplary responses. This approach enhances the model's ability to understand and generate high-quality responses across various languages and contexts.
ใใฌใคใณในใใฉใฏใใใฅใผใใณใฐๆๆณใ็จใใฆใๆจก็ฏ็ๅ็ญใๅญฆ็ฟใใใพใใใใใฎๆๆณใซใใใใขใใซใฏๆงใ ใช่จ่ชใใณใณใใญในใใซใใใฆ้ซๅ่ณชใชๅฟ็ญใ็่งฃใ็ๆใใ่ฝๅใๅไธใใฆใใพใใ
Implementation Information
[Pre-Instruction Training]
https://huggingface.co/instruction-pretrain/instruction-synthesizer
[Disclaimer]
ใใฎใขใใซใฏ็ ็ฉถ้็บใฎใฟใ็ฎ็ใจใใฆๆไพใใใใใฎใงใใใๅฎ้จ็ใชใใญใใฟใคใใจใฟใชใใใในใใขใใซใงใใ ๅๆฅญ็ใชไฝฟ็จใใใใทใงใณใฏใชใใฃใซใซใช็ฐๅขใธใฎ้ ๅใๆๅณใใใใฎใงใฏใใใพใใใ ๆฌใขใใซใฎไฝฟ็จใฏใไฝฟ็จ่ ใฎ่ฒฌไปปใซใใใฆ่กใใใใใฎใจใใใใฎๆง่ฝใใใณ็ตๆใฏไฟ่จผใใใพใใใ Axcxeptๆ ชๅผไผ็คพใฏใ็ดๆฅ็ใ้ๆฅ็ใ็นๅฅใๅถ็บ็ใ็ตๆ็ใชๆๅฎณใใพใใฏๆฌใขใใซใฎไฝฟ็จใใ็ใใใใใชใๆๅคฑใซๅฏพใใฆใใๅพใใใ็ตๆใซใใใใใใไธๅใฎ่ฒฌไปปใ่ฒ ใใพใใใ ๅฉ็จ่ ใฏใๆฌใขใใซใฎไฝฟ็จใซไผดใใชในใฏใๅๅใซ็่งฃใใ่ชๅทฑใฎๅคๆญใงไฝฟ็จใใใใฎใจใใพใใ
[Hardware]
A100 ร 8(Running in 2h)
[่ฌ่พ]
ๆฌใใผในใขใใซใ้็บใใฆใใ ใใฃใGoogle็คพใชใใณใซๅฝ่ฉฒใใผใ ใฎ้็บ่ ใฎๆนใ ใใพใ่ชๅ่ฉไพกใฎๆๆณใๆไพใใฆใใ ใใฃใๅคๆฐใฎๆนใ ใซๆ่ฌใจๅฐๆฌใฎๆใ่กจใใพใใ
[We are.]
- Downloads last month
- 103
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit


