Instructions to use bruhpika/cheme-phi3-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use bruhpika/cheme-phi3-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="bruhpika/cheme-phi3-GGUF", filename="cheme-phi3-f16.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 bruhpika/cheme-phi3-GGUF 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 bruhpika/cheme-phi3-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf bruhpika/cheme-phi3-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf bruhpika/cheme-phi3-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf bruhpika/cheme-phi3-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 bruhpika/cheme-phi3-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf bruhpika/cheme-phi3-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 bruhpika/cheme-phi3-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf bruhpika/cheme-phi3-GGUF:Q4_K_M
Use Docker
docker model run hf.co/bruhpika/cheme-phi3-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use bruhpika/cheme-phi3-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bruhpika/cheme-phi3-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bruhpika/cheme-phi3-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bruhpika/cheme-phi3-GGUF:Q4_K_M
- Ollama
How to use bruhpika/cheme-phi3-GGUF with Ollama:
ollama run hf.co/bruhpika/cheme-phi3-GGUF:Q4_K_M
- Unsloth Studio
How to use bruhpika/cheme-phi3-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 bruhpika/cheme-phi3-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 bruhpika/cheme-phi3-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for bruhpika/cheme-phi3-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use bruhpika/cheme-phi3-GGUF with Docker Model Runner:
docker model run hf.co/bruhpika/cheme-phi3-GGUF:Q4_K_M
- Lemonade
How to use bruhpika/cheme-phi3-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bruhpika/cheme-phi3-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.cheme-phi3-GGUF-Q4_K_M
List all available models
lemonade list
ChemE-Phi3-GGUF
This repository contains GGUF (GPT-Generated Unified Format) quantized weights for ChemE-LLM, a domain-specific fine-tuned model based on microsoft/Phi-3-mini-4k-instruct. It is tailored specifically for chemical engineering simulation environments (DWSIM and MATLAB) and optimized for Retrieval-Augmented Generation (RAG) pipelines.
For the full open-source codebase, data curation pipelines, backend FastAPI server, and Next.js UI, visit our GitHub Repository.
Model Overview
- GitHub Codebase & Pipeline:
bruhpika/ChemEng_finetuning-main - Base Model:
microsoft/Phi-3-mini-4k-instruct - Domain Specialization: Chemical Engineering Simulations (
DWSIMandMATLAB). - Training Data: Supervised Fine-Tuning (SFT) on ~5,300 synthetic QA pairs generated from a dual-source knowledge base:
- Track A (Official Documentation): Verified technical manuals, documentation, academic papers, and HTML/PDF reference guides for DWSIM and MATLAB.
- Track B (Curated Media / YouTube Videos): Expert-curated instructional YouTube videos, visual tutorials, and procedural walkthroughs transcribed and structured into technical knowledge chunks.
- Knowledge Base (KB): The raw sources were deduplicated and chunked into 763 validated knowledge chunks (DWSIM: 296 chunks, MATLAB: 461+ chunks), which serve both as the foundation for training data synthesis and as the grounding database for RAG retrieval during live inference.
- Intended Use: Technical assistance, RAG-grounded QA, and step-by-step procedural guidance for chemical engineers.
- Context Window: 4,096 tokens
Quantization / Memory Ladder
Choose the GGUF file that best fits your hardware RAM/VRAM constraints:
| File Name | Quantization | Recommended For | VRAM / RAM Required | Speed vs. Quality |
|---|---|---|---|---|
cheme-phi3-q4_k_m.gguf |
Q4_K_M |
Recommended Default for standard laptops / consumer GPUs | ~3.5 GB | Balanced high speed & good quality |
cheme-phi3-q5_k_m.gguf |
Q5_K_M |
Users wanting slightly higher accuracy with moderate RAM | ~4.2 GB | Slight speed trade-off for better precision |
cheme-phi3-q8_0.gguf |
Q8_0 |
High-fidelity extraction & strict numerical simulation QA | ~6.0 GB | Near F16 quality, higher VRAM usage |
cheme-phi3-f16.gguf |
F16 |
Uncompressed reference weights / development | ~7.6 GB | Maximum quality, highest memory consumption |
Quickstart Guide
1. Running with llama-server / llama.cpp (Recommended)
You can launch an OpenAI-compatible API server using llama-server:
# Launch server on port 8081 with Q4_K_M weights
llama-server.exe -m cheme-phi3-q4_k_m.gguf -c 4096 --port 8081 -ngl 999
Query the server via curl:
curl http://127.0.0.1:8081/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "cheme-phi3",
"messages": [
{"role": "system", "content": "You are a chemical engineering assistant knowledgeable in DWSIM and MATLAB."},
{"role": "user", "content": "How do I configure the parameters for a Flash Drum in DWSIM?"}
],
"temperature": 0.2
}'
2. Running with Ollama
Create a file named Modelfile in the same directory as the .gguf file:
FROM ./cheme-phi3-q4_k_m.gguf
PARAMETER temperature 0.2
PARAMETER num_ctx 4096
SYSTEM "You are an expert chemical engineering AI assistant trained in DWSIM and MATLAB workflows."
Create and run the model in Ollama:
ollama create cheme-phi3 -f Modelfile
ollama run cheme-phi3
Evaluation & Performance Note
When deployed alongside our domain-specific Vector Store (ChromaDB with 763 validated engineering documentation chunks), ChemE-Phi3 demonstrates high accuracy in determining thermodynamic properties, configuring unit operations, and generating clean simulation code while minimizing hallucinations.
License & Acknowledgements
- License: MIT License
- Lead Engineer: Harshith Bhardwaz Kenkari
- Acknowledgements: Built using QLoRA fine-tuning on
microsoft/Phi-3-mini-4k-instructand exported usingllama.cpp.
Ollama Quick Start (Easiest Method)
For users who want to chat with the model immediately without setting up a Python virtual environment, you can use Ollama to pull and run the model directly from our Hugging Face repository in a single command. Depending on your hardware, you can choose from all available quantization tiers:
# 1. Run the recommended Q8_0 model (Best balance of speed/accuracy, ~4.06 GB)
ollama run hf.co/bruhpika/cheme-phi3-GGUF:Q8_0
# 2. Run the balanced Q5_K_M model (Excellent speed/accuracy, ~2.76 GB)
ollama run hf.co/bruhpika/cheme-phi3-GGUF:Q5_K_M
# 3. Run the ultra-compact Q4_K_M model (For older hardware/constrained devices, ~2.40 GB)
ollama run hf.co/bruhpika/cheme-phi3-GGUF:Q4_K_M
# 4. Run the unquantized F16 base model (Maximum fidelity, requires ≥12GB RAM, ~7.64 GB)
ollama run hf.co/bruhpika/cheme-phi3-GGUF:F16
- Downloads last month
- 190
4-bit
5-bit
8-bit
16-bit
Model tree for bruhpika/cheme-phi3-GGUF
Base model
microsoft/Phi-3-mini-4k-instruct