Instructions to use baxin/RakutenAI-7B-chat-Quantized-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use baxin/RakutenAI-7B-chat-Quantized-model with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="baxin/RakutenAI-7B-chat-Quantized-model", filename="ggml-model-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use baxin/RakutenAI-7B-chat-Quantized-model 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 baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M # Run inference directly in the terminal: llama cli -hf baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M # Run inference directly in the terminal: llama cli -hf baxin/RakutenAI-7B-chat-Quantized-model: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 baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf baxin/RakutenAI-7B-chat-Quantized-model: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 baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M
Use Docker
docker model run hf.co/baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use baxin/RakutenAI-7B-chat-Quantized-model with Ollama:
ollama run hf.co/baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M
- Unsloth Studio
How to use baxin/RakutenAI-7B-chat-Quantized-model 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 baxin/RakutenAI-7B-chat-Quantized-model 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 baxin/RakutenAI-7B-chat-Quantized-model to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for baxin/RakutenAI-7B-chat-Quantized-model to start chatting
- Atomic Chat new
- Docker Model Runner
How to use baxin/RakutenAI-7B-chat-Quantized-model with Docker Model Runner:
docker model run hf.co/baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M
- Lemonade
How to use baxin/RakutenAI-7B-chat-Quantized-model with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull baxin/RakutenAI-7B-chat-Quantized-model:Q4_K_M
Run and chat with the model
lemonade run user.RakutenAI-7B-chat-Quantized-model-Q4_K_M
List all available models
lemonade list
output = llm(
"Once upon a time,",
max_tokens=512,
echo=True
)
print(output)The original model is RakutenAI-7B-chat.
| name | size |
|---|---|
| ggml-model-f16.gguf | 14.7GB |
| ggml-model-Q4_K_M.gguf | 4.46GB |
| ggml-model-Q5_K_M.gguf | 5.23GB |
| ggml-model-Q5_K_S.gguf | 5.1GB |
| ggml-model-Q6_K.gguf |
Usage with llama-cpp
from llama_cpp import Llama
import ctypes
llm = Llama(model_path="/content/ggml-model-Q4_K_M.gguf", n_gpu_layers=32)
prompt="東京について教えてください。"
input_prompt = f"""
[INST] <>
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
<>
{prompt} [/INST]
"""
output = llm(
input_prompt,
max_tokens=2048,
)
print(output["choices"][0]["text"])
output
はい、東京は、日本の首都です。日本最大の都市で、世界でも有数の大都市です。東京は世界有数の経済都市であり、日本経済の中心地でもあります。東京には、世界有数の観光スポット、博物館、美術館、ショッピングセンター、レストラン、劇場、娯楽施設などが数多くあります。東京は、日本の文化、歴史、伝統、芸術、科学技術の最先端を体験するのに最適な場所です。東京では、東京スカイツリー、上野公園の梅花苑、東京スカイツリー、東京国立博物館、東京タワー、六本木ヒルズ、東京スカイツリータウンなどの観光スポットが人気です。東京を訪れるなら、江戸時代の伝統文化を体験することができる浅草寺や、日本料理や和菓子の食べ物を楽しめるおすすめの場所で、東京の伝統的な文化を体験することができます。東京には、歴史的に重要で、世界的に有名な場所もあります。たとえば、東京国立博物館、江戸東京博物館、東京国立博物館、東京国立博物館、東京国立博物館などの博物館があります。東京では、東京オリンピックや、世界最大級の国際会議やイベントなど、世界的に有名なイベントが開催されることもあります。東京には、世界有数の企業や、日本の政府機関や国際機関が数多くあります。東京は世界有数のビジネス都市であり、国際的な金融センターでもあります。東京で人気の観光スポットとしては、東京スカイツリー、上野公園の梅花苑、東京スカイツリー、東京タワー、六本木ヒルズ、東京スカイツリータウンなどの施設があります。東京を訪れるなら、江戸時代の伝統文化を体験することができる浅草寺や、日本料理や和菓子の食べ物を楽しめる
Google Colab https://github.com/koji/GoogleColab/blob/main/RakutenAI_7B_chat_Quantized_model_test.ipynb
- Downloads last month
- 30
Hardware compatibility
Log In to add your hardware
4-bit
5-bit
6-bit
16-bit
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="baxin/RakutenAI-7B-chat-Quantized-model", filename="", )