Instructions to use llmware/phi-3-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use llmware/phi-3-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="llmware/phi-3-gguf", filename="phi3.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use llmware/phi-3-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 llmware/phi-3-gguf # Run inference directly in the terminal: llama cli -hf llmware/phi-3-gguf
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf llmware/phi-3-gguf # Run inference directly in the terminal: llama cli -hf llmware/phi-3-gguf
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 llmware/phi-3-gguf # Run inference directly in the terminal: ./llama-cli -hf llmware/phi-3-gguf
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 llmware/phi-3-gguf # Run inference directly in the terminal: ./build/bin/llama-cli -hf llmware/phi-3-gguf
Use Docker
docker model run hf.co/llmware/phi-3-gguf
- LM Studio
- Jan
- Ollama
How to use llmware/phi-3-gguf with Ollama:
ollama run hf.co/llmware/phi-3-gguf
- Unsloth Studio
How to use llmware/phi-3-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 llmware/phi-3-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 llmware/phi-3-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for llmware/phi-3-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use llmware/phi-3-gguf with Docker Model Runner:
docker model run hf.co/llmware/phi-3-gguf
- Lemonade
How to use llmware/phi-3-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull llmware/phi-3-gguf
Run and chat with the model
lemonade run user.phi-3-gguf-{{QUANT_TAG}}List all available models
lemonade list
Update config.json
Browse files- config.json +1 -1
config.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
| 36 |
"prompt_format": "<|user|>\n{context_passage}\n{question}\n<|end|>\n<|assistant|>",
|
| 37 |
"prompt_format_dict": {"system_start": "<|system|>\n", "system_stop": "<|end|>\n", "main_start": "<|user|>\n", "main_stop": "<|end|>\n", "start_llm_response": "<|assistant|>"},
|
| 38 |
"tokenizer_local": "tokenizer_phi3.json",
|
| 39 |
-
"
|
| 40 |
"model_parent": "microsoft/Phi-3-mini-4k-instruct",
|
| 41 |
"description": "Microsoft Phi-3-mini - 3.8 parameter base",
|
| 42 |
"quantization": "int4",
|
|
|
|
| 36 |
"prompt_format": "<|user|>\n{context_passage}\n{question}\n<|end|>\n<|assistant|>",
|
| 37 |
"prompt_format_dict": {"system_start": "<|system|>\n", "system_stop": "<|end|>\n", "main_start": "<|user|>\n", "main_stop": "<|end|>\n", "start_llm_response": "<|assistant|>"},
|
| 38 |
"tokenizer_local": "tokenizer_phi3.json",
|
| 39 |
+
"tokenizer_config_mhq": {"bos_id": [1], "bos_token": ["<s>"], "eos_id": [32000,32001,32007], "eos_token": ["<|endoftext|>","<|assistant|>","<|end|>"]},
|
| 40 |
"model_parent": "microsoft/Phi-3-mini-4k-instruct",
|
| 41 |
"description": "Microsoft Phi-3-mini - 3.8 parameter base",
|
| 42 |
"quantization": "int4",
|