Instructions to use CyberCoder225/maira-model 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 CyberCoder225/maira-model 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 CyberCoder225/maira-model:Q4_K_M # Run inference directly in the terminal: llama cli -hf CyberCoder225/maira-model:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf CyberCoder225/maira-model:Q4_K_M # Run inference directly in the terminal: llama cli -hf CyberCoder225/maira-model: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 CyberCoder225/maira-model:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf CyberCoder225/maira-model: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 CyberCoder225/maira-model:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf CyberCoder225/maira-model:Q4_K_M
Use Docker
docker model run hf.co/CyberCoder225/maira-model:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use CyberCoder225/maira-model with Ollama:
ollama run hf.co/CyberCoder225/maira-model:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use CyberCoder225/maira-model with Docker Model Runner:
docker model run hf.co/CyberCoder225/maira-model:Q4_K_M
- Lemonade
How to use CyberCoder225/maira-model with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CyberCoder225/maira-model:Q4_K_M
Run and chat with the model
lemonade run user.maira-model-Q4_K_M
List all available models
lemonade list
- Atomic Chat
File size: 891 Bytes
f1dd13a bb83df7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import os
from flask import Flask, request, jsonify
from llama_cpp import Llama
from huggingface_hub import hf_hub_download
app = Flask(__name__)
# Replace with your info
REPO_ID = "CyberCoder225/maira-model"
FILENAME = "SmolLM2-360M-Instruct.Q4_K_M.gguf"
# This downloads the model from HF to Render's temporary memory
print("Fetching Maira's brain from Hugging Face...")
model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
llm = Llama(model_path=model_path, n_ctx=2048)
@app.route('/chat', methods=['POST'])
def chat():
data = request.json
user_input = data.get("message", "")
prompt = f"### User: {user_input}\n### Maira:"
output = llm(prompt, max_tokens=150, stop=["###", "</s>"], echo=False)
response = output["choices"][0]["text"].strip()
return jsonify({"maira": response})
if __name__ == "__main__":
app.run(host="0.0.0.0", port=10000) |