Instructions to use Miwa-Keita/zenz-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Miwa-Keita/zenz-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Miwa-Keita/zenz-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Miwa-Keita/zenz-v1") model = AutoModelForCausalLM.from_pretrained("Miwa-Keita/zenz-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Miwa-Keita/zenz-v1 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Miwa-Keita/zenz-v1:Q8_0 # Run inference directly in the terminal: llama cli -hf Miwa-Keita/zenz-v1:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Miwa-Keita/zenz-v1:Q8_0 # Run inference directly in the terminal: llama cli -hf Miwa-Keita/zenz-v1:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Miwa-Keita/zenz-v1:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf Miwa-Keita/zenz-v1:Q8_0
Use Docker
docker model run hf.co/Miwa-Keita/zenz-v1:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use Miwa-Keita/zenz-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Miwa-Keita/zenz-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Miwa-Keita/zenz-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Miwa-Keita/zenz-v1:Q8_0
- SGLang
How to use Miwa-Keita/zenz-v1 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 "Miwa-Keita/zenz-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Miwa-Keita/zenz-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Miwa-Keita/zenz-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Miwa-Keita/zenz-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Miwa-Keita/zenz-v1 with Ollama:
ollama run hf.co/Miwa-Keita/zenz-v1:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use Miwa-Keita/zenz-v1 with Docker Model Runner:
docker model run hf.co/Miwa-Keita/zenz-v1:Q8_0
- Lemonade
How to use Miwa-Keita/zenz-v1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Miwa-Keita/zenz-v1:Q8_0
Run and chat with the model
lemonade run user.zenz-v1-Q8_0
List all available models
lemonade list
- Atomic Chat
zenz-v1
zenz-v1はGPT-2アーキテクチャに基づくかな漢字変換タスクに特化した言語モデルです。ニューラルかな漢字変換システム「Zenzai」で利用することを想定しています。
- 90Mパラメタ
- 文字単位+バイト単位BPEトークナイザー
- かな漢字変換タスクにおいて貪欲法で高い性能
Model Details
Model Description
CC-BY-SA 4.0で提供されているku-nlp/gpt2-small-japanese-charを基盤モデルとして利用しています。
本モデルはCC-BY-SA 4.0で提供します。
- Developed by: Keita Miwa (𝕏)
- Model type: GPT-2
- Language(s) (NLP): Japanese
- License: CC-BY-SA 4.0
- Finetuned from model: ku-nlp/gpt2-small-japanese-char
Model Sources
本モデルはZenzai(AzooKeyKanaKanjiConverter)と共に利用することを想定して構築しています。
Acknowledgements
以下のライブラリやツール、言語資源を活用して本モデルを構築しました。
- MeCab (https://taku910.github.io/mecab/)
- ipadic-NEologd (https://github.com/neologd/mecab-ipadic-neologd)
- torch (https://pypi.org/project/torch/)
- transformers (https://pypi.org/project/transformers/)
- datasets (https://pypi.org/project/datasets/)
- jaconv (https://pypi.org/project/jaconv/)
- llama.cpp (https://github.com/ggerganov/llama.cpp)
- Downloads last month
- 162
Hardware compatibility
Log In to add your hardware
8-bit