Instructions to use tom1669/PhoGPT-4B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use tom1669/PhoGPT-4B-Chat with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tom1669/PhoGPT-4B-Chat", filename="PhoGPT-4B-Chat.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use tom1669/PhoGPT-4B-Chat with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tom1669/PhoGPT-4B-Chat # Run inference directly in the terminal: llama-cli -hf tom1669/PhoGPT-4B-Chat
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tom1669/PhoGPT-4B-Chat # Run inference directly in the terminal: llama-cli -hf tom1669/PhoGPT-4B-Chat
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 tom1669/PhoGPT-4B-Chat # Run inference directly in the terminal: ./llama-cli -hf tom1669/PhoGPT-4B-Chat
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 tom1669/PhoGPT-4B-Chat # Run inference directly in the terminal: ./build/bin/llama-cli -hf tom1669/PhoGPT-4B-Chat
Use Docker
docker model run hf.co/tom1669/PhoGPT-4B-Chat
- LM Studio
- Jan
- Ollama
How to use tom1669/PhoGPT-4B-Chat with Ollama:
ollama run hf.co/tom1669/PhoGPT-4B-Chat
- Unsloth Studio new
How to use tom1669/PhoGPT-4B-Chat 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 tom1669/PhoGPT-4B-Chat 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 tom1669/PhoGPT-4B-Chat to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tom1669/PhoGPT-4B-Chat to start chatting
- Docker Model Runner
How to use tom1669/PhoGPT-4B-Chat with Docker Model Runner:
docker model run hf.co/tom1669/PhoGPT-4B-Chat
- Lemonade
How to use tom1669/PhoGPT-4B-Chat with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tom1669/PhoGPT-4B-Chat
Run and chat with the model
lemonade run user.PhoGPT-4B-Chat-{{QUANT_TAG}}List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf tom1669/PhoGPT-4B-Chat# Run inference directly in the terminal:
llama-cli -hf tom1669/PhoGPT-4B-ChatUse 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 tom1669/PhoGPT-4B-Chat# Run inference directly in the terminal:
./llama-cli -hf tom1669/PhoGPT-4B-ChatBuild 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 tom1669/PhoGPT-4B-Chat# Run inference directly in the terminal:
./build/bin/llama-cli -hf tom1669/PhoGPT-4B-ChatUse Docker
docker model run hf.co/tom1669/PhoGPT-4B-ChatYAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
GGUF format files of the model vinai/PhoGPT-4B-Chat.
This model file is compatible with the latest llama.cpp
Context: I was trying to get PhoGPT to work with llama-cpp and llama-cpp-python. I found nguyenviet/PhoGPT-4B-Chat-GGUF but cannot get it to work:
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="nguyenviet/PhoGPT-4B-Chat-GGUF",
filename="*q3_k_m.gguf*",
)
...
llama_model_load: error loading model: done_getting_tensors: wrong number of tensors; expected 388, got 387
llama_load_model_from_file: failed to load model
...
After my opening issue at the PhoGPT repo was resolved, I was able to create the gguf file.
I figure people want to try the model in Colab. So here it is, so you don't have to create it yourself
- Downloads last month
- 9
We're not able to determine the quantization variants.
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf tom1669/PhoGPT-4B-Chat# Run inference directly in the terminal: llama-cli -hf tom1669/PhoGPT-4B-Chat