Instructions to use simraann/ExplainIt-Phi-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use simraann/ExplainIt-Phi-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="simraann/ExplainIt-Phi-GGUF", filename="ExplainIt-Phi-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use simraann/ExplainIt-Phi-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf simraann/ExplainIt-Phi-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf simraann/ExplainIt-Phi-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf simraann/ExplainIt-Phi-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf simraann/ExplainIt-Phi-GGUF: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 simraann/ExplainIt-Phi-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf simraann/ExplainIt-Phi-GGUF: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 simraann/ExplainIt-Phi-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf simraann/ExplainIt-Phi-GGUF:Q4_K_M
Use Docker
docker model run hf.co/simraann/ExplainIt-Phi-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use simraann/ExplainIt-Phi-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "simraann/ExplainIt-Phi-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "simraann/ExplainIt-Phi-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/simraann/ExplainIt-Phi-GGUF:Q4_K_M
- Ollama
How to use simraann/ExplainIt-Phi-GGUF with Ollama:
ollama run hf.co/simraann/ExplainIt-Phi-GGUF:Q4_K_M
- Unsloth Studio new
How to use simraann/ExplainIt-Phi-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 simraann/ExplainIt-Phi-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 simraann/ExplainIt-Phi-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for simraann/ExplainIt-Phi-GGUF to start chatting
- Docker Model Runner
How to use simraann/ExplainIt-Phi-GGUF with Docker Model Runner:
docker model run hf.co/simraann/ExplainIt-Phi-GGUF:Q4_K_M
- Lemonade
How to use simraann/ExplainIt-Phi-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull simraann/ExplainIt-Phi-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.ExplainIt-Phi-GGUF-Q4_K_M
List all available models
lemonade list
Model Card for ExplainIt-Phi-GGUF
This repository contains GGUF versions of a microsoft/phi-2 model fine-tuned using QLoRA to explain complex topics in simple, ELI5-style terms.
Model Overview
ExplainIt-Phi is a 2.7B parameter causal language model designed to be a clear and concise explainer. It was fine-tuned on a curated subset of the ELI5 dataset to excel at breaking down complex ideas.
- Language(s): English
- GitHub Repo: https://github.com/Simran32909/ExplainIt-Phi/
Intended Uses & Limitations
This model is intended for direct use as a question-answering assistant. It is well-suited for generating content for educational materials, blogs, and chatbots. For best results, prompts should follow the format: Instruct: <your question>\nOutput:.
The model is not designed for creative writing or complex multi-turn conversations and may reflect the biases of its training data (the ELI5 subreddit). Always fact-check critical outputs.
How to Get Started
These GGUF models are designed for use with llama.cpp.
- Download a model file:
Q4_K_Mis recommended for general use. - Run with
llama.cpp:./llama-cli -m ./ExplainIt-Phi-Q4_K_M.gguf -p "Instruct: Why is the sky blue?\nOutput:" -n 256
Available Files
This repository provides multiple quantization levels to suit different hardware needs.
| File Name | Quantization | Use Case |
|---|---|---|
ExplainIt-Phi-Q4_K_M.gguf |
Q4_K_M (4-bit) | Default. Balanced quality and size. |
ExplainIt-Phi-Q5_K_M.gguf |
Q5_K_M (5-bit) | Higher quality for systems with more RAM. |
ExplainIt-Phi-Q8_0.gguf |
Q8_0 (8-bit) | Near-lossless, best for GPU execution. |
Evaluation: Before vs. After
The fine-tuning process significantly improved the model's ability to provide simple, analogy-driven explanations.
Prompt: What is an API and what does it do, in simple terms?
| Base Phi-2 Model (Before) | Fine-Tuned ExplainIt-Phi (After) |
|---|---|
| "An API, or Application Programming Interface, is a set of rules and protocols that allows different software applications to communicate with each other. It acts as a bridge between two applications, allowing them to exchange data and functionality." | "An API is like a waiter in a restaurant. You (an application) don't need to know how the kitchen works. You just give your order (a request) to the waiter (the API), and the waiter brings you your food (the data)." |
Training Details
The model was fine-tuned using the QLoRA technique on a curated subset of the sentence-transformers/eli5 dataset. For a full breakdown of the training procedure, hyperparameters, and infrastructure, please see the project's GitHub repository.
- Downloads last month
- 20
4-bit
5-bit
8-bit
Model tree for simraann/ExplainIt-Phi-GGUF
Base model
microsoft/phi-2