✨ 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
Safetensors
Model size
0.6B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using muhammad-taqi512/LYRA 1