Text Generation
Transformers
Safetensors
qwen2
chat
instruct
128k-context
lightweight
multilingual
conversational
text-generation-inference
Instructions to use MaxKio/Mio-1.0-Pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MaxKio/Mio-1.0-Pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MaxKio/Mio-1.0-Pro") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MaxKio/Mio-1.0-Pro") model = AutoModelForCausalLM.from_pretrained("MaxKio/Mio-1.0-Pro") 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 MaxKio/Mio-1.0-Pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MaxKio/Mio-1.0-Pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MaxKio/Mio-1.0-Pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MaxKio/Mio-1.0-Pro
- SGLang
How to use MaxKio/Mio-1.0-Pro 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 "MaxKio/Mio-1.0-Pro" \ --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": "MaxKio/Mio-1.0-Pro", "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 "MaxKio/Mio-1.0-Pro" \ --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": "MaxKio/Mio-1.0-Pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MaxKio/Mio-1.0-Pro with Docker Model Runner:
docker model run hf.co/MaxKio/Mio-1.0-Pro
| license: apache-2.0 | |
| language: | |
| - en | |
| - ar | |
| - zh | |
| - es | |
| - fr | |
| - de | |
| - ru | |
| - ja | |
| - ko | |
| - pt | |
| library_name: transformers | |
| tags: | |
| - qwen2 | |
| - chat | |
| - instruct | |
| - 128k-context | |
| - lightweight | |
| - multilingual | |
| base_model: Qwen/Qwen2.5-0.5B-Instruct | |
| pipeline_tag: text-generation | |
| # Mio 1.0 Pro | |
| <div align="center"> | |
| **Advanced Lightweight AI Assistant** | 494M Parameters | 128K Context Window | |
| </div> | |
| ## Overview | |
| Mio 1.0 Pro is a lightweight yet powerful AI assistant model based on Qwen2.5-0.5B-Instruct, enhanced with extended context support and optimized for responsive, high-quality conversations. Designed to run efficiently on resource-constrained environments including CPU-only deployments. | |
| ## Key Features | |
| - **494M Parameters** - Ultra-lightweight, runs on CPU with ~1.4GB RAM | |
| - **128K Context Window** - Extended context via RoPE scaling (rope_theta: 4,000,000) | |
| - **Multilingual** - Supports 20+ languages including Arabic, English, Chinese, and more | |
| - **Code Generation** - Enhanced in-context learning for programming tasks | |
| - **CPU Optimized** - Runs efficiently without GPU acceleration | |
| ## Modifications from Base Model | |
| | Feature | Base (Qwen2.5-0.5B) | Mio 1.0 Pro | | |
| |---------|---------------------|-------------| | |
| | Context Length | 32K | 128K | | |
| | RoPE Theta | 1,000,000 | 4,000,000 | | |
| | In-Context Learning | Default | Enhanced code examples | | |
| ## Quick Start | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model_name = "MaxKio/Mio-1.0-Pro" | |
| tokenizer = AutoTokenizer.from_pretrained(model_name) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_name, | |
| dtype="auto", | |
| device_map="auto" | |
| ) | |
| messages = [ | |
| {"role": "system", "content": "You are Mio 1.0 Pro, an advanced AI assistant."}, | |
| {"role": "user", "content": "Write a Python function to check if a number is prime."} | |
| ] | |
| text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) | |
| inputs = tokenizer(text, return_tensors="pt") | |
| outputs = model.generate(**inputs, max_new_tokens=512) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| ## Deployment | |
| Mio 1.0 Pro is optimized for lightweight server deployment: | |
| ```bash | |
| # Minimum requirements | |
| # - RAM: 2GB | |
| # - Disk: 1GB | |
| # - CPU: Any modern x86/ARM processor | |
| # - GPU: Optional (not required) | |
| ``` | |
| ## Supported Languages | |
| English, Arabic, Chinese (Simplified/Traditional), Spanish, French, German, Russian, Japanese, Korean, Portuguese, Italian, Dutch, Polish, Turkish, Vietnamese, Thai, Indonesian, Hindi, and more. | |
| ## License | |
| Apache 2.0 - This model is built upon [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) by Qwen/Alibaba, licensed under Apache 2.0. | |
| ## Author | |
| **MaxKio** - [HuggingFace Profile](https://huggingface.co/MaxKio) | |