Instructions to use AJKADZ/PHI_CODER 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 AJKADZ/PHI_CODER 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 AJKADZ/PHI_CODER:Q4_K_M # Run inference directly in the terminal: llama cli -hf AJKADZ/PHI_CODER:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AJKADZ/PHI_CODER:Q4_K_M # Run inference directly in the terminal: llama cli -hf AJKADZ/PHI_CODER: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 AJKADZ/PHI_CODER:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf AJKADZ/PHI_CODER: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 AJKADZ/PHI_CODER:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AJKADZ/PHI_CODER:Q4_K_M
Use Docker
docker model run hf.co/AJKADZ/PHI_CODER:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use AJKADZ/PHI_CODER with Ollama:
ollama run hf.co/AJKADZ/PHI_CODER:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use AJKADZ/PHI_CODER with Docker Model Runner:
docker model run hf.co/AJKADZ/PHI_CODER:Q4_K_M
- Lemonade
How to use AJKADZ/PHI_CODER with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AJKADZ/PHI_CODER:Q4_K_M
Run and chat with the model
lemonade run user.PHI_CODER-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download phi-coder-hf/llama.cpp/tools/server/tests/unit/test_vision_api.py from AJKADZ/PHI_CODER: direct link, hf CLI and curl.
- Browser
- Download file 2.39 kB
-
https://huggingface.co/AJKADZ/PHI_CODER/resolve/main/phi-coder-hf/llama.cpp/tools/server/tests/unit/test_vision_api.py
- Command line
-
hf download hf://AJKADZ/PHI_CODER/phi-coder-hf/llama.cpp/tools/server/tests/unit/test_vision_api.py
-
curl -L -o test_vision_api.py https://huggingface.co/AJKADZ/PHI_CODER/resolve/main/phi-coder-hf/llama.cpp/tools/server/tests/unit/test_vision_api.py
2.39 kB
| import pytest | |
| from utils import * | |
| import base64 | |
| import requests | |
| server: ServerProcess | |
| IMG_URL_0 = "https://huggingface.co/ggml-org/tinygemma3-GGUF/resolve/main/test/11_truck.png" | |
| IMG_URL_1 = "https://huggingface.co/ggml-org/tinygemma3-GGUF/resolve/main/test/91_cat.png" | |
| response = requests.get(IMG_URL_0) | |
| response.raise_for_status() # Raise an exception for bad status codes | |
| IMG_BASE64_0 = "data:image/png;base64," + base64.b64encode(response.content).decode("utf-8") | |
| def create_server(): | |
| global server | |
| server = ServerPreset.tinygemma3() | |
| def test_vision_chat_completion(prompt, image_url, success, re_content): | |
| global server | |
| server.start(timeout_seconds=60) # vision model may take longer to load due to download size | |
| if image_url == "IMG_BASE64_0": | |
| image_url = IMG_BASE64_0 | |
| res = server.make_request("POST", "/chat/completions", data={ | |
| "temperature": 0.0, | |
| "top_k": 1, | |
| "messages": [ | |
| {"role": "user", "content": [ | |
| {"type": "text", "text": prompt}, | |
| {"type": "image_url", "image_url": { | |
| "url": image_url, | |
| }}, | |
| ]}, | |
| ], | |
| }) | |
| if success: | |
| assert res.status_code == 200 | |
| choice = res.body["choices"][0] | |
| assert "assistant" == choice["message"]["role"] | |
| assert match_regex(re_content, choice["message"]["content"]) | |
| else: | |
| assert res.status_code != 200 | |