Instructions to use MagDevX/FormaFit-3B-GGUF 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 MagDevX/FormaFit-3B-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 MagDevX/FormaFit-3B-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf MagDevX/FormaFit-3B-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf MagDevX/FormaFit-3B-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf MagDevX/FormaFit-3B-GGUF:Q8_0
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 MagDevX/FormaFit-3B-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf MagDevX/FormaFit-3B-GGUF:Q8_0
Use Docker
docker model run hf.co/MagDevX/FormaFit-3B-GGUF:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use MagDevX/FormaFit-3B-GGUF with Ollama:
ollama run hf.co/MagDevX/FormaFit-3B-GGUF:Q8_0
- Unsloth Desktop
- Pi
How to use MagDevX/FormaFit-3B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MagDevX/FormaFit-3B-GGUF:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MagDevX/FormaFit-3B-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use MagDevX/FormaFit-3B-GGUF with Docker Model Runner:
docker model run hf.co/MagDevX/FormaFit-3B-GGUF:Q8_0
- Lemonade
How to use MagDevX/FormaFit-3B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MagDevX/FormaFit-3B-GGUF:Q8_0
Run and chat with the model
lemonade run user.FormaFit-3B-GGUF-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use MagDevX/FormaFit-3B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MagDevX/FormaFit-3B-GGUF:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default MagDevX/FormaFit-3B-GGUF:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use MagDevX/FormaFit-3B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MagDevX/FormaFit-3B-GGUF:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "MagDevX/FormaFit-3B-GGUF:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download space/app.py from MagDevX/FormaFit-3B-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 2.39 kB
-
https://huggingface.co/MagDevX/FormaFit-3B-GGUF/resolve/main/space/app.py
- Command line
-
hf download hf://MagDevX/FormaFit-3B-GGUF/space/app.py
-
curl -L -o app.py https://huggingface.co/MagDevX/FormaFit-3B-GGUF/resolve/main/space/app.py
2.39 kB
| import csv | |
| import re | |
| import gradio as gr | |
| from llama_cpp import Llama | |
| from pypdf import PdfReader | |
| from sklearn.feature_extraction.text import TfidfVectorizer | |
| from sklearn.metrics.pairwise import cosine_similarity | |
| import araclar | |
| from proje import PROJE_ADI, KURUM, ISARET, REHBER, TEST, rag_sistem | |
| GGUF_DEPO = "MagDevX/FormaFit-3B-GGUF" | |
| GGUF_DOSYA = "formafit-3b-q8_0.gguf" | |
| llm = Llama.from_pretrained(repo_id=GGUF_DEPO, filename=GGUF_DOSYA, | |
| n_ctx=2048, n_threads=2, verbose=False) | |
| def sor(mesajlar, maks=200): | |
| c = llm.create_chat_completion(messages=mesajlar, max_tokens=maks, temperature=0) | |
| return c["choices"][0]["message"]["content"].strip() | |
| metin = "\n".join(s.extract_text() for s in PdfReader(REHBER).pages) | |
| PARCALAR = [b.strip() for b in re.split(r"\n(?=\d+\. [A-ZÇĞİÖŞÜ])", metin)[1:]] | |
| tfidf = TfidfVectorizer(analyzer="char_wb", ngram_range=(3, 5)).fit(PARCALAR) | |
| MATRIS = tfidf.transform(PARCALAR) | |
| def ara(soru, k=2): | |
| puan = cosine_similarity(tfidf.transform([soru]), MATRIS)[0] | |
| return [PARCALAR[i] for i in puan.argsort()[::-1][:k]] | |
| araclar.ARA = ara | |
| def asistan_rag(soru): | |
| bulunan = ara(soru) | |
| cevap = sor([{"role": "system", "content": rag_sistem("\n\n".join(bulunan))}, | |
| {"role": "user", "content": soru}], 160) | |
| return cevap, [p.split("\n")[0] for p in bulunan] | |
| def cevapla(mesaj, gecmis, mod): | |
| try: | |
| if mod == "Sohbet": | |
| return sor([{"role": "user", "content": mesaj}], 120) | |
| if mod == "Rehber (RAG)": | |
| cevap, kaynaklar = asistan_rag(mesaj) | |
| return f"{cevap}\n\n_Kaynak: {', '.join(kaynaklar)}_" | |
| cevap, izler = araclar.ajan(mesaj, sor) | |
| return cevap + (f"\n\n_🔧 {' · '.join(izler)}_" if izler else "") | |
| except Exception as hata: | |
| return f"Bir sorun oldu: {type(hata).__name__}. Tekrar dener misiniz? {ISARET}" | |
| with open(TEST, encoding="utf-8") as f: | |
| ORNEKLER = [[r["soru"]] for r in list(csv.DictReader(f))[:3]] | |
| demo = gr.ChatInterface( | |
| cevapla, | |
| additional_inputs=[gr.Radio(["Sohbet", "Rehber (RAG)", "Ajan"], | |
| value="Rehber (RAG)", label="Mod")], | |
| title=f"{PROJE_ADI} {ISARET}", | |
| description=f"{KURUM} asistanı · CPU'da çalışır, cevaplar 10-60 sn sürebilir", | |
| examples=ORNEKLER, | |
| cache_examples=False) | |
| if __name__ == "__main__": | |
| demo.launch() | |