Instructions to use mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf 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 mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf mmnga/ELYZA-japanese-CodeLlama-7b-instruct-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 mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf mmnga/ELYZA-japanese-CodeLlama-7b-instruct-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 mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M
Use Docker
docker model run hf.co/mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf with Ollama:
ollama run hf.co/mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M
- Unsloth Studio
How to use mmnga/ELYZA-japanese-CodeLlama-7b-instruct-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 mmnga/ELYZA-japanese-CodeLlama-7b-instruct-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 mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf to start chatting
- Docker Model Runner
How to use mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf with Docker Model Runner:
docker model run hf.co/mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M
- Lemonade
How to use mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf:Q4_K_M
Run and chat with the model
lemonade run user.ELYZA-japanese-CodeLlama-7b-instruct-gguf-Q4_K_M
List all available models
lemonade list
- Atomic Chat
ELYZA-japanese-CodeLlama-7b-instruct-gguf
ELYZAさんが公開しているELYZA-japanese-CodeLlama-7b-instructのggufフォーマット変換版です。
他のモデルはこちら
通常版: llama2に日本語のデータセットで学習したモデル
mmnga/ELYZA-japanese-Llama-2-7b-gguf
mmnga/ELYZA-japanese-Llama-2-7b-instruct-gguf
Fast版 日本語の語彙を追加してトークンコストを減らし、1.8倍高速化したモデル
mmnga/ELYZA-japanese-Llama-2-7b-fast-gguf
mmnga/ELYZA-japanese-Llama-2-7b-fast-instruct-gguf
Codellama版 GGUF
mmnga/ELYZA-japanese-CodeLlama-7b-gguf
mmnga/ELYZA-japanese-CodeLlama-7b-instruct-gguf
Codellama版 GPTQ
mmnga/ELYZA-japanese-CodeLlama-7b-instruct-GPTQ-calib-ja-1k
Usage
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
make -j
./main -m 'ELYZA-japanese-CodeLlama-7b-instruct-q4_0.gguf' -n 256 -p '[INST] <<SYS>>あなたは誠実で優秀な日本人のアシスタントです。<</SYS>>エラトステネスの篩についてサンプルコードを示し、解説してください。 [/INST]'
ggufへの変換
llama.cppのconvert.pyで変換するとエラーになってしまうので、下記の方法で変換できます。
- tokenizer.model を持ってきてモデルディレクトリに配置してください。
- added_tokens.jsonに下記内容で保存してモデルディレクトリに配置してください。
{
"<SU": 32000,
"<SUF": 32001,
"<PRE": 32002,
"<M": 32003,
"<MID": 32004,
"<E": 32005,
"<EOT": 32006,
"<PRE>": 32007,
"<SUF>": 32008,
"<MID>": 32009,
"<EOT>": 32010,
"<EOT><EOT>": 32011,
"<EOT><EOT><EOT>": 32012,
"<EOT><EOT><EOT><EOT>": 32013,
"<EOT><EOT><EOT><EOT><EOT>": 32014,
"<EOT><EOT><EOT><EOT><EOT><EOT>": 32015
}
convert.py "<path_to_model>" --outtype f16
で変換できます。
Licence
Llama 2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
引用 Citations
@misc{elyzacodellama2023,
title={ELYZA-japanese-CodeLlama-7b},
url={https://huggingface.co/elyza/ELYZA-japanese-CodeLlama-7b},
author={Akira Sasaki and Masato Hirakawa and Shintaro Horie and Tomoaki Nakamura},
year={2023},
}
@misc{rozière2023code,
title={Code Llama: Open Foundation Models for Code},
author={Baptiste Rozière and Jonas Gehring and Fabian Gloeckle and Sten Sootla and Itai Gat and Xiaoqing Ellen Tan and Yossi Adi and Jingyu Liu and Tal Remez and Jérémy Rapin and Artyom Kozhevnikov and Ivan Evtimov and Joanna Bitton and Manish Bhatt and Cristian Canton Ferrer and Aaron Grattafiori and Wenhan Xiong and Alexandre Défossez and Jade Copet and Faisal Azhar and Hugo Touvron and Louis Martin and Nicolas Usunier and Thomas Scialom and Gabriel Synnaeve},
year={2023},
eprint={2308.12950},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{touvron2023llama,
title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom},
year={2023},
eprint={2307.09288},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- Downloads last month
- 464
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit