Text Generation
Transformers
Safetensors
English
qwen2
custom-ai
lyra
muhammad-taqi
conversational
text-generation-inference
Instructions to use muhammad-taqi512/LYRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use muhammad-taqi512/LYRA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="muhammad-taqi512/LYRA") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("muhammad-taqi512/LYRA") model = AutoModelForCausalLM.from_pretrained("muhammad-taqi512/LYRA", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use muhammad-taqi512/LYRA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "muhammad-taqi512/LYRA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "muhammad-taqi512/LYRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/muhammad-taqi512/LYRA
- SGLang
How to use muhammad-taqi512/LYRA with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "muhammad-taqi512/LYRA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "muhammad-taqi512/LYRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "muhammad-taqi512/LYRA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "muhammad-taqi512/LYRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use muhammad-taqi512/LYRA with Docker Model Runner:
docker model run hf.co/muhammad-taqi512/LYRA
✨ LYRA AI Engine
Architected, Fine-Tuned & Deployed by Muhammad Taqi
An independent, lightweight, high-performance Language Model built for logical reasoning, clean code synthesis, and contextual dynamic conversations.
👨💻 Author & Creator Profile
- Creator / Lead Engineer: Muhammad Taqi
- Model Identity: LYRA Core Engine
- Architecture Base: Causal Language Modeling
- Repository:
muhammad-taqi512/LYRA - License: Apache 2.0
"LYRA is designed as an autonomous, high-efficiency client-and-cloud native AI model engineered to deliver lightning-fast responses with precise ChatML structuring." — Muhammad Taqi
⚡ Key Capabilities & Features
- 🚀 Engineered by Muhammad Taqi: Tailored system execution for fast response streaming and low-latency inference.
- 🧠 ChatML Native Execution: Built to understand structured system persona directives and multi-turn conversational trees.
- 💻 Clean Code Generation: Precision output tuned for full-stack engineering, JavaScript, Python, and automated web setups.
- 🔒 Zero Third-Party Branding: Fully independent execution layer without runtime dependencies on external base models in application outputs.
🛠️ Usage Instructions
Python (transformers Integration)
Aap is model ko direct Muhammad Taqi's Hugging Face Repository se pull karke Python mein run kar sakte hain:
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse, HTMLResponse
from fastapi.middleware.cors import CORSMiddleware
from transformers import pipeline, AutoTokenizer
import datetime
app = FastAPI()
# CORS enabled for local/web connectivity
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Initialize Model (Aapka Model ID)
print("⏳ Loading LYRA Core Engine...")
model_id = 'muhammad-taqi512/LYRA'
tokenizer = AutoTokenizer.from_pretrained(model_id)
ai_pipeline = pipeline('text-generation', model=model_id, tokenizer=tokenizer)
print("✅ LYRA AI Engine Active!")
# Serve index.html UI at root route
@app.get("/", response_class=HTMLResponse)
async def serve_index():
with open("index.html", "r", encoding="utf-8") as f:
return f.read()
@app.post("/api/chat")
async def chat_endpoint(data: dict):
# Extracting parameters sent from frontend
user_message = data.get("message", "")
custom_rules = data.get(
"custom_rules",
"You are LYRA, an advanced AI created by Muhammad Taqi. You give accurate answers and clean code."
)
if not user_message:
return JSONResponse({"error": "Message is missing"}, status_code=400)
# Constructing prompt using incoming custom rules
full_prompt = f"<|im_start|>system\n{custom_rules}\n<|im_end|>\n<|im_start|>user\n{user_message}\n<|im_end|>\n<|im_start|>assistant\n"
# Model Generation
output = ai_pipeline(
full_prompt,
max_new_tokens=250,
temperature=0.7,
top_p=0.9,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
# Extract response
raw_text = output[0]['generated_text']
response_text = raw_text.split("<|im_start|>assistant\n")[-1].replace("<|im_end|>", "").strip()
return {
"status": "success",
"response": response_text
}
- Downloads last month
- 208