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
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -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
- Llama new
- 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/webui/vite.config.ts from AJKADZ/PHI_CODER: direct link, hf CLI and curl.
- Browser
- Download file 2.55 kB
-
https://huggingface.co/AJKADZ/PHI_CODER/resolve/main/phi-coder-hf/llama.cpp/tools/server/webui/vite.config.ts
- Command line
-
hf download hf://AJKADZ/PHI_CODER/phi-coder-hf/llama.cpp/tools/server/webui/vite.config.ts
-
curl -L -o vite.config.ts https://huggingface.co/AJKADZ/PHI_CODER/resolve/main/phi-coder-hf/llama.cpp/tools/server/webui/vite.config.ts
2.55 kB
| import { defineConfig, PluginOption } from 'vite'; | |
| import react from '@vitejs/plugin-react'; | |
| import { viteSingleFile } from 'vite-plugin-singlefile'; | |
| import path from 'node:path'; | |
| import fs from 'node:fs'; | |
| import * as fflate from 'fflate'; | |
| /* eslint-disable */ | |
| const MAX_BUNDLE_SIZE = 2 * 1024 * 1024; // only increase when absolutely necessary | |
| const GUIDE_FOR_FRONTEND = ` | |
| <!-- | |
| This is a single file build of the frontend. | |
| It is automatically generated by the build process. | |
| Do not edit this file directly. | |
| To make changes, refer to the "Web UI" section in the README. | |
| --> | |
| `.trim(); | |
| const FRONTEND_PLUGINS = [react()]; | |
| const BUILD_PLUGINS = [ | |
| ...FRONTEND_PLUGINS, | |
| viteSingleFile(), | |
| (function llamaCppPlugin() { | |
| let config: any; | |
| return { | |
| name: 'llamacpp:build', | |
| apply: 'build', | |
| async configResolved(_config: any) { | |
| config = _config; | |
| }, | |
| writeBundle() { | |
| const outputIndexHtml = path.join(config.build.outDir, 'index.html'); | |
| let content = | |
| GUIDE_FOR_FRONTEND + '\n' + fs.readFileSync(outputIndexHtml, 'utf-8'); | |
| content = content.replace(/\r/g, ''); // remove windows-style line endings | |
| const compressed = fflate.gzipSync(Buffer.from(content, 'utf-8'), { | |
| level: 9, | |
| }); | |
| // because gzip header contains machine-specific info, we must remove these data from the header | |
| // timestamp | |
| compressed[0x4] = 0; | |
| compressed[0x5] = 0; | |
| compressed[0x6] = 0; | |
| compressed[0x7] = 0; | |
| // OS | |
| compressed[0x9] = 0; | |
| if (compressed.byteLength > MAX_BUNDLE_SIZE) { | |
| throw new Error( | |
| `Bundle size is too large (${Math.ceil(compressed.byteLength / 1024)} KB).\n` + | |
| `Please reduce the size of the frontend or increase MAX_BUNDLE_SIZE in vite.config.js.\n` | |
| ); | |
| } | |
| const targetOutputFile = path.join( | |
| config.build.outDir, | |
| '../../public/index.html.gz' | |
| ); | |
| fs.writeFileSync(targetOutputFile, compressed); | |
| }, | |
| } satisfies PluginOption; | |
| })(), | |
| ]; | |
| export default defineConfig({ | |
| // @ts-ignore | |
| plugins: process.env.ANALYZE ? FRONTEND_PLUGINS : BUILD_PLUGINS, | |
| server: { | |
| proxy: { | |
| '/v1': 'http://localhost:8080', | |
| '/props': 'http://localhost:8080', | |
| }, | |
| headers: { | |
| 'Cross-Origin-Embedder-Policy': 'require-corp', | |
| 'Cross-Origin-Opener-Policy': 'same-origin', | |
| }, | |
| }, | |
| }); | |