Text Generation
GGUF
English
Hindi
multilingual
pocketllm
on-device
edge-ai
mobile
android
offline
mediapipe
llama
gemma
qwen
phi
imatrix
conversational
Instructions to use AmareshHebbar/pocketllm-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use AmareshHebbar/pocketllm-models with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="AmareshHebbar/pocketllm-models", filename="gemma-3-1b-it-q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AmareshHebbar/pocketllm-models 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 AmareshHebbar/pocketllm-models:Q4_K_M # Run inference directly in the terminal: llama cli -hf AmareshHebbar/pocketllm-models:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AmareshHebbar/pocketllm-models:Q4_K_M # Run inference directly in the terminal: llama cli -hf AmareshHebbar/pocketllm-models: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 AmareshHebbar/pocketllm-models:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf AmareshHebbar/pocketllm-models: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 AmareshHebbar/pocketllm-models:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AmareshHebbar/pocketllm-models:Q4_K_M
Use Docker
docker model run hf.co/AmareshHebbar/pocketllm-models:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use AmareshHebbar/pocketllm-models with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AmareshHebbar/pocketllm-models" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AmareshHebbar/pocketllm-models", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AmareshHebbar/pocketllm-models:Q4_K_M
- Ollama
How to use AmareshHebbar/pocketllm-models with Ollama:
ollama run hf.co/AmareshHebbar/pocketllm-models:Q4_K_M
- Unsloth Studio
How to use AmareshHebbar/pocketllm-models 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 AmareshHebbar/pocketllm-models 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 AmareshHebbar/pocketllm-models to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AmareshHebbar/pocketllm-models to start chatting
- Atomic Chat new
- Docker Model Runner
How to use AmareshHebbar/pocketllm-models with Docker Model Runner:
docker model run hf.co/AmareshHebbar/pocketllm-models:Q4_K_M
- Lemonade
How to use AmareshHebbar/pocketllm-models with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AmareshHebbar/pocketllm-models:Q4_K_M
Run and chat with the model
lemonade run user.pocketllm-models-Q4_K_M
List all available models
lemonade list
| license: apache-2.0 | |
| tags: | |
| - pocketllm | |
| - on-device | |
| - edge-ai | |
| - mobile | |
| - android | |
| - offline | |
| - mediapipe | |
| - gguf | |
| - llama | |
| - gemma | |
| - qwen | |
| - phi | |
| language: | |
| - en | |
| - hi | |
| - multilingual | |
| pipeline_tag: text-generation | |
| # PocketLLM Model Collection | |
| <div align="center"> | |
| **The official model collection for [PocketLLM](https://github.com/amareshhebbar/PocketLLM)** | |
| *Private β’ Offline β’ On-Device AI for Android* | |
| [](https://github.com/amareshhebbar/PocketLLM) | |
| [](https://github.com/amareshhebbar/PocketLLM) | |
| [](LICENSE) | |
| </div> | |
| --- | |
| ## What is PocketLLM? | |
| PocketLLM is an Android app that runs large language models **completely on your device** β no internet required during inference, no data sent to the cloud, no subscriptions. | |
| This repository hosts the curated model collection optimized for mobile edge inference using: | |
| - **MediaPipe LLM Inference** (for `.bin` and `.task` files β Gemma family) | |
| - **llama.cpp via llama.rn** (for `.gguf` files β Llama, Phi, Qwen, SmolLM, Gemma 3) | |
| --- | |
| ## Model Catalog | |
| ### β‘ Ultra Fast β Under 1 GB, fits any Android phone | |
| | Model | File | Size | Format | RAM | | |
| |-------|------|------|--------|-----| | |
| | Qwen 2.5 0.5B | `qwen2.5-0.5b-instruct-q4_k_m.gguf` | 0.4 GB | GGUF | 2 GB | | |
| | Gemma 3 1B | `gemma-3-1b-it-q4_k_m.gguf` | 0.7 GB | GGUF | 2 GB | | |
| | Llama 3.2 1B | `llama-3.2-1b-instruct-q4_k_m.gguf` | 0.8 GB | GGUF | 3 GB | | |
| | SmolLM2 1.7B | `smollm2-1.7b-instruct-q4_k_m.gguf` | 1.0 GB | GGUF | 3 GB | | |
| ### βοΈ Balanced β 1β2 GB, great quality on mid-range phones | |
| | Model | File | Size | Format | RAM | | |
| |-------|------|------|--------|-----| | |
| | Gemma 1.1 2B (CPU) | `gemma-1.1-2b-it-cpu-int4.bin` | 1.35 GB | MediaPipe | 4 GB | | |
| | Gemma 1.1 2B (GPU) | `gemma-1.1-2b-it-gpu-int4.bin` | 1.35 GB | MediaPipe | 4 GB | | |
| | Llama 3.2 3B | `llama-3.2-3b-instruct-q4_k_m.gguf` | 2.0 GB | GGUF | 4 GB | | |
| ### π Powerful β Best quality, needs 5GB+ RAM | |
| | Model | File | Size | Format | RAM | | |
| |-------|------|------|--------|-----| | |
| | Phi-3.5 Mini | `phi-3.5-mini-instruct-q4_k_m.gguf` | 2.4 GB | GGUF | 5 GB | | |
| | Gemma 3 4B | `gemma-3-4b-it-q4_k_m.gguf` | 2.8 GB | GGUF | 6 GB | | |
| --- | |
| ## How to Use in PocketLLM | |
| Models are downloaded directly inside the PocketLLM app. Open the **Model Store** tab, select a model, and tap Download. The app handles everything automatically. | |
| **Direct download URLs:** | |
| ``` | |
| https://huggingface.co/AmareshHebbar/pocketllm-models/resolve/main/<filename> | |
| ``` | |
| --- | |
| ## Fine-Tuning Roadmap | |
| > *Coming soon β within the next 2 weeks* | |
| We are fine-tuning these base models specifically for **on-device conversational AI** on mobile: | |
| ### Goals | |
| - Better persona adherence (the model stays in character consistently) | |
| - Shorter, more natural responses (base models tend to be verbose on mobile) | |
| - Improved memory utilization (uses injected memories naturally) | |
| - Better instruction following for small context windows (2048 tokens) | |
| - Hindi + English code-switching support (for India market) | |
| ### Training approach | |
| - **Base:** Llama 3.2 1B, Gemma 3 1B (smallest models first β fastest iteration) | |
| - **Method:** QLoRA fine-tuning (4-bit, similar to the AxioMapper training setup) | |
| - **Dataset:** Curated conversational dataset optimized for mobile edge constraints | |
| - **Hardware:** Single A100 via RunPod | |
| - **Framework:** Unsloth (2x faster fine-tuning, same as AxioMapper) | |
| ### Fine-tuned models (coming soon) | |
| - `pocketllm-llama-1b-v1.gguf` β Llama 3.2 1B fine-tuned for mobile chat | |
| - `pocketllm-gemma-1b-v1.gguf` β Gemma 3 1B fine-tuned for persona consistency | |
| --- | |
| ## Model Selection Guide | |
| ``` | |
| Your phone has... Best model to start with | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| 2 GB RAM (budget) β Qwen 2.5 0.5B (fastest) | |
| 3 GB RAM β Llama 3.2 1B (balanced speed) | |
| 4 GB RAM (mid-range) β Gemma 1.1 2B (best all-rounder) | |
| 6 GB RAM β Llama 3.2 3B (better quality) | |
| 8 GB RAM (flagship) β Phi-3.5 Mini (best for coding) | |
| ``` | |
| --- | |
| ## Technical Details | |
| ### MediaPipe format (`.bin`, `.task`) | |
| - Used for Gemma family | |
| - Runs via Google's MediaPipe LLM Inference SDK | |
| - Supports CPU and GPU acceleration (Vulkan/OpenCL) | |
| - Integrated via `react-native-llm-mediapipe` | |
| ### GGUF format (`.gguf`) | |
| - Used for Llama, Qwen, Phi, SmolLM, Gemma 3 | |
| - Runs via llama.cpp (the gold standard for mobile inference) | |
| - Q4_K_M quantization β best balance of size and quality | |
| - Integrated via `llama.rn` | |
| --- | |
| ## Repository Structure | |
| ``` | |
| pocketllm-models/ | |
| βββ gemma-1.1-2b-it-cpu-int4.bin β Gemma 2B CPU (MediaPipe) | |
| βββ gemma-1.1-2b-it-gpu-int4.bin β Gemma 2B GPU (MediaPipe) | |
| βββ gemma-3-1b-it-q4_k_m.gguf β Gemma 3 1B (GGUF) | |
| βββ gemma-3-4b-it-q4_k_m.gguf β Gemma 3 4B (GGUF) | |
| βββ llama-3.2-1b-instruct-q4_k_m.gguf β Llama 3.2 1B (GGUF) | |
| βββ llama-3.2-3b-instruct-q4_k_m.gguf β Llama 3.2 3B (GGUF) | |
| βββ phi-3.5-mini-instruct-q4_k_m.gguf β Phi-3.5 Mini (GGUF) | |
| βββ qwen2.5-0.5b-instruct-q4_k_m.gguf β Qwen 2.5 0.5B (GGUF) | |
| βββ smollm2-1.7b-instruct-q4_k_m.gguf β SmolLM2 1.7B (GGUF) | |
| ``` | |
| --- | |
| ## License | |
| - **Gemma models:** [Gemma Terms of Use](https://ai.google.dev/gemma/terms) | |
| - **Llama models:** [Meta Llama 3.2 Community License](https://llama.meta.com/llama3_2/license/) | |
| - **Phi models:** [MIT License](https://huggingface.co/microsoft/Phi-3.5-mini-instruct/blob/main/LICENSE) | |
| - **Qwen models:** [Apache 2.0](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct/blob/main/LICENSE) | |
| - **SmolLM2:** [Apache 2.0](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct/blob/main/LICENSE) | |
| - **Fine-tuned models by PocketLLM:** Apache 2.0 | |
| --- | |
| ## Built By | |
| **Amaresh Hebbar** | |
| Building PocketLLM: the only mobile app that runs a full AI agent stack β smart routing, persona memory, MCP tools β completely offline on Android. | |
| *"Your AI. Your phone. Nobody else's business."* | |
| [](https://github.com/amareshhebbar) |