Text Generation
Transformers
Safetensors
English
qwen2
text-generation-inference
unsloth
conversational
Instructions to use MutionHydra/HyperAI-Developer-Edition with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MutionHydra/HyperAI-Developer-Edition with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MutionHydra/HyperAI-Developer-Edition") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MutionHydra/HyperAI-Developer-Edition") model = AutoModelForCausalLM.from_pretrained("MutionHydra/HyperAI-Developer-Edition", 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 MutionHydra/HyperAI-Developer-Edition with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MutionHydra/HyperAI-Developer-Edition" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MutionHydra/HyperAI-Developer-Edition", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MutionHydra/HyperAI-Developer-Edition
- SGLang
How to use MutionHydra/HyperAI-Developer-Edition 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 "MutionHydra/HyperAI-Developer-Edition" \ --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": "MutionHydra/HyperAI-Developer-Edition", "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 "MutionHydra/HyperAI-Developer-Edition" \ --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": "MutionHydra/HyperAI-Developer-Edition", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use MutionHydra/HyperAI-Developer-Edition with Docker Model Runner:
docker model run hf.co/MutionHydra/HyperAI-Developer-Edition
| import os | |
| import gradio as gr | |
| from openai import OpenAI | |
| # Lee el token directamente de las variables de entorno del sistema | |
| API_URL = os.getenv("QWEN_API_BASE", "https://api-inference.huggingface.co/v1") | |
| API_KEY = os.getenv("HF_TOKEN", os.getenv("QWEN_API_KEY", "")) | |
| client = OpenAI( | |
| base_url=API_URL, | |
| api_key=API_KEY | |
| ) | |
| MODEL_ID = "Qwen/Qwen2.5-Coder-7B-Instruct" | |
| SYSTEM_PROMPT = """Eres HyperAI, una Inteligencia Artificial de élite especializada exclusivamente en desarrollo de software, arquitectura de sistemas y programación avanzada. | |
| Fuiste creada por el desarrollador Mution. | |
| Reglas estrictas de comportamiento: | |
| 1. No menciones tu recuento de parámetros, tu modelo base ni detalles de tu entrenamiento. Si te preguntan quién eres, responde que eres HyperAI, creada por Mution. | |
| 2. Eres experta en Python, JavaScript (Node.js, Express, Next.js), bases de datos (MongoDB, MySQL) y administración de servidores (Linux, Docker, VPS, Cloudflare Tunnels). | |
| 3. Entrega código limpio, optimizado y listo para producción. Usa buenas prácticas, manejo de errores y comentarios concisos. | |
| 4. Si el usuario tiene un error en su código, identifica el problema directamente antes de darle la solución completa. | |
| 5. Tu tono debe ser directo, técnico y profesional, como un Ingeniero de Software Senior.""" | |
| def respond(message, history): | |
| messages = [{"role": "system", "content": SYSTEM_PROMPT}] | |
| for user_msg, assistant_msg in history: | |
| messages.append({"role": "user", "content": user_msg}) | |
| messages.append({"role": "assistant", "content": assistant_msg}) | |
| messages.append({"role": "user", "content": message}) | |
| try: | |
| response = client.chat.completions.create( | |
| model=MODEL_ID, | |
| messages=messages, | |
| temperature=0.5, | |
| max_tokens=2048, | |
| stream=True | |
| ) | |
| partial_message = "" | |
| for chunk in response: | |
| if chunk.choices[0].delta.content: | |
| partial_message += chunk.choices[0].delta.content | |
| yield partial_message | |
| except Exception as e: | |
| yield f"⚠️ [Error de Compilación/Conexión HyperAI]: {str(e)}" | |
| with gr.Blocks(theme=gr.themes.Monochrome()) as demo: | |
| gr.Markdown("# ⚡ HyperAI - Developer Studio") | |
| gr.Markdown("**Creador:** `Mution` | **Especialidad:** `Ingeniería de Software & Devops`") | |
| chatbot = gr.ChatInterface( | |
| fn=respond, | |
| examples=[ | |
| "Crea una API REST en Node.js (Express) con MongoDB para registrar usuarios.", | |
| "Escribe el código para un bot de Discord en Python usando discord.py con Slash Commands.", | |
| "¿Cómo expongo un panel de Pterodactyl local usando un túnel de Cloudflare en Linux?", | |
| "Optimiza este script de Python y explícame dónde estaba el cuello de botella." | |
| ], | |
| fill_height=True | |
| ) | |
| if __name__ == "__main__": | |
| demo.queue().launch() | |