CoolFace
Modelpublic

muhammad-taqi512/LYRA

sourceHugging Faceapache-2.0updated 5h agoView on Hugging Face
2likes
Model Card

โœจ LYRA AI Engine

<div align="center">

<h3><b>Architected, Fine-Tuned & Deployed by Muhammad Taqi</b></h3> <p>An independent, lightweight, high-performance Language Model built for logical reasoning, clean code synthesis, and contextual dynamic conversations.</p>

</div>


๐Ÿ‘จโ€๐Ÿ’ป 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:

python
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
    }