102 lines
2.7 KiB
Markdown
102 lines
2.7 KiB
Markdown
---
|
|
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)
|