Instructions to use TheBloke/openchat_3.5-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/openchat_3.5-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheBloke/openchat_3.5-GGUF", dtype="auto") - llama-cpp-python
How to use TheBloke/openchat_3.5-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="TheBloke/openchat_3.5-GGUF", filename="openchat_3.5.Q2_K.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 TheBloke/openchat_3.5-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf TheBloke/openchat_3.5-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf TheBloke/openchat_3.5-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 TheBloke/openchat_3.5-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf TheBloke/openchat_3.5-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 TheBloke/openchat_3.5-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TheBloke/openchat_3.5-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 TheBloke/openchat_3.5-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TheBloke/openchat_3.5-GGUF:Q4_K_M
Use Docker
docker model run hf.co/TheBloke/openchat_3.5-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use TheBloke/openchat_3.5-GGUF with Ollama:
ollama run hf.co/TheBloke/openchat_3.5-GGUF:Q4_K_M
- Unsloth Studio
How to use TheBloke/openchat_3.5-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 TheBloke/openchat_3.5-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 TheBloke/openchat_3.5-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for TheBloke/openchat_3.5-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use TheBloke/openchat_3.5-GGUF with Docker Model Runner:
docker model run hf.co/TheBloke/openchat_3.5-GGUF:Q4_K_M
- Lemonade
How to use TheBloke/openchat_3.5-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheBloke/openchat_3.5-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.openchat_3.5-GGUF-Q4_K_M
List all available models
lemonade list
I really need help with Templates? How to interpret and use them?
I use Oobabooga. In the readme it says...
prompt_template: |
GPT4 User: {prompt}<|end_of_turn|>GPT4 Assistant:
How do I use this in instruct mode in Oobabooga? Or do I have to use chat mode? I prefer having a long discussion with the AI not role play but asking questions and getting it to write stories based on what we discussed etc. Kind of like how one would use ChatGPT. Basically how can I add that template into Ooba? I've been to the Instruct template tab. I know how to change templates. But not how to properly format or add new ones etc.
There is an OpenChat template in Oobabooga
User string
GPT4 User:
Bot String
GPT4 Assistant:
Turn template
<|user|> <|user-message|><|end_of_turn|><|bot|> <|bot-message|><|end_of_turn|>
Command for chat-instrruct mode
Continue the chat dialogue below. Write a single reply for the character "<|character|>".
<|prompt|>
But this is not the correct one right? How do I use the one in the readme?
No I did not.
I have same question. How to use System in template?
@Goldenblood56 did you figure out?
Try:
Turn template
<|user|> <|user-message|><|end_of_turn|><|bot|> <|bot-message|>
User string
GPT4 User:
Bot string
GPT4 Assistant:
Thank you. I think I stopped using this model but the information provided may still help me. I might try this out. I notice for a lot of models I just choose Alpaca, Guanaco or ChatLm and results pretty good. lol I still don't know how to setup a custom template in Ooba. But this may help me.
did it?