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/tests/test-mtmd-c-api.c from AJKADZ/PHI_CODER: direct link, hf CLI and curl.
- Browser
- Download file 2.27 kB
-
https://huggingface.co/AJKADZ/PHI_CODER/resolve/main/phi-coder-hf/llama.cpp/tests/test-mtmd-c-api.c
- Command line
-
hf download hf://AJKADZ/PHI_CODER/phi-coder-hf/llama.cpp/tests/test-mtmd-c-api.c
-
curl -L -o test-mtmd-c-api.c https://huggingface.co/AJKADZ/PHI_CODER/resolve/main/phi-coder-hf/llama.cpp/tests/test-mtmd-c-api.c
2.27 kB
| int main(void) { | |
| printf("\n\nTesting libmtmd C API...\n"); | |
| printf("--------\n\n"); | |
| struct mtmd_context_params params = mtmd_context_params_default(); | |
| printf("Default image marker: %s\n", params.image_marker); | |
| mtmd_input_chunks * chunks = mtmd_test_create_input_chunks(); | |
| if (!chunks) { | |
| fprintf(stderr, "Failed to create input chunks\n"); | |
| return 1; | |
| } | |
| size_t n_chunks = mtmd_input_chunks_size(chunks); | |
| printf("Number of chunks: %zu\n", n_chunks); | |
| assert(n_chunks > 0); | |
| for (size_t i = 0; i < n_chunks; i++) { | |
| const mtmd_input_chunk * chunk = mtmd_input_chunks_get(chunks, i); | |
| assert(chunk != NULL); | |
| enum mtmd_input_chunk_type type = mtmd_input_chunk_get_type(chunk); | |
| printf("Chunk %zu type: %d\n", i, type); | |
| if (type == MTMD_INPUT_CHUNK_TYPE_TEXT) { | |
| size_t n_tokens; | |
| const llama_token * tokens = mtmd_input_chunk_get_tokens_text(chunk, &n_tokens); | |
| printf(" Text chunk with %zu tokens\n", n_tokens); | |
| assert(tokens != NULL); | |
| assert(n_tokens > 0); | |
| for (size_t j = 0; j < n_tokens; j++) { | |
| assert(tokens[j] >= 0); | |
| printf(" > Token %zu: %d\n", j, tokens[j]); | |
| } | |
| } else if (type == MTMD_INPUT_CHUNK_TYPE_IMAGE) { | |
| const mtmd_image_tokens * image_tokens = mtmd_input_chunk_get_tokens_image(chunk); | |
| size_t n_tokens = mtmd_image_tokens_get_n_tokens(image_tokens); | |
| size_t nx = mtmd_image_tokens_get_nx(image_tokens); | |
| size_t ny = mtmd_image_tokens_get_ny(image_tokens); | |
| const char * id = mtmd_image_tokens_get_id(image_tokens); | |
| assert(n_tokens > 0); | |
| assert(nx > 0); | |
| assert(ny > 0); | |
| assert(id != NULL); | |
| printf(" Image chunk with %zu tokens\n", n_tokens); | |
| printf(" Image size: %zu x %zu\n", nx, ny); | |
| printf(" Image ID: %s\n", id); | |
| } | |
| } | |
| // Free the chunks | |
| mtmd_input_chunks_free(chunks); | |
| printf("\n\nDONE: test libmtmd C API...\n"); | |
| return 0; | |
| } | |