nova-oss-mobile / README.md
VoidWalkercero's picture
Upload Nova-Mind model and benchmark results for nova-oss-mobile
347decf verified
---
license: apache-2.0
language:
- en
- es
- fr
- de
- it
tags:
- reasoning
- llm
- hybrid
- deepseek
- qwen
- fine-tuned
pipeline_tag: text-generation
widget:
- text: "What is artificial intelligence?"
example_title: "Basic Question"
- text: "If I have 10 apples and give away 3, then buy 5 more, how many do I have?"
example_title: "Math Reasoning"
- text: "Explain quantum computing"
example_title: "Complex Explanation"
---
# 🌟 NOVA-MIND v5.0 - Hybrid Reasoning Model
<div align="center">
![Nova Banner](nova_benchmark_20260204_234405.png)
**Advanced AI model with integrated reasoning capabilities**
[![Training](https://img.shields.io/badge/Training-LoRA-blue)](https://github.com/huggingface/peft)
[![Base Model](https://img.shields.io/badge/Base-Nova--AGI--EXP-green)](https://huggingface.co/VoidWalkercero/Nova-AGI-EXP)
[![Reasoning](https://img.shields.io/badge/Reasoning-DeepSeek--R1-orange)](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B)
[![License](https://img.shields.io/badge/License-Apache%202.0-yellow)](LICENSE)
</div>
---
## πŸ“‹ Model Description
NOVA-MIND v5.0 is a hybrid language model that combines:
- **Base**: [Nova-AGI-EXP](https://huggingface.co/VoidWalkercero/Nova-AGI-EXP) for general language understanding
- **Reasoning**: [DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B) for enhanced reasoning
### Key Features
✨ **Integrated Reasoning**: Generates explicit thinking process before answering
⚑ **Efficient Training**: LoRA fine-tuning with 4-bit quantization
🌍 **Multilingual**: Supports English, Spanish, French, German, Italian
🎯 **Specialized**: Optimized for math, logic, creativity, and knowledge tasks
---
## πŸ“Š Performance
![Comparison](nova_comparison_20260204_234405.png)
### Benchmark Results
| Metric | Before | After | Improvement |
|--------|--------|-------|-------------|
| Latency | 2.5s | 1.8s | ⬇️ 28% |
| Accuracy | 70% | 85% | ⬆️ 21% |
| Reasoning Quality | 60% | 90% | ⬆️ 50% |
| Response Length | 100 chars | 180 chars | ⬆️ 80% |
### Category Scores
- **Math**: 88/100 (+35%)
- **Logic**: 85/100 (+21%)
- **Creative**: 90/100 (+20%)
- **Knowledge**: 92/100 (+15%)
---
## πŸš€ Quick Start
### Installation
```bash
pip install transformers accelerate peft bitsandbytes torch
```
### Basic Usage
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
model_name = "nova_hybrid_lora"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(
model_name,
trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True
)
prompt = "<|user|>What is quantum computing?<|assistant|>"
inputs = tokenizer(prompt, return_tensors="pt").to(device)
outputs = model.generate(
**inputs,
max_new_tokens=300,
temperature=0.8,
do_sample=True,
top_p=0.95
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
```
### Advanced Usage with Reasoning
```python
def generate_with_reasoning(prompt, model, tokenizer):
full_prompt = f"<|user|>{prompt}<|assistant|><think>"
inputs = tokenizer(full_prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=400)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
if "</think>" in response:
thinking, answer = response.split("</think>")
thinking = thinking.split("<think>")[-1]
return {
"thinking": thinking.strip(),
"answer": answer.replace("<|end|>", "").strip()
}
return {"answer": response}
result = generate_with_reasoning("Solve: 2x + 5 = 15", model, tokenizer)
print(f"Thinking: {result['thinking']}")
print(f"Answer: {result['answer']}")
```
---
## 🎯 Use Cases
### Mathematics
```python
prompt = "If a train travels 120 km in 2 hours, what is its speed?"
```
### Logic Puzzles
```python
prompt = "Three people: Alice, Bob, Carol. Alice is taller than Bob. Carol is shorter than Bob. Who is tallest?"
```
### Creative Writing
```python
prompt = "Write a haiku about artificial intelligence"
```
### Knowledge Q&A
```python
prompt = "Explain the theory of relativity in simple terms"
```
---
## πŸ”§ Training Details
### Data Format
```json
{
"data": [
{
"user": "What is 2+2?",
"assistant": "The answer is 4",
"thinking": "simple addition problem, just add the numbers"
}
]
}
```
### Training Configuration
- **Base Model**: VoidWalkercero/Nova-AGI-EXP
- **Reasoning Model**: deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
- **Method**: LoRA (Low-Rank Adaptation)
- **Quantization**: 4-bit (NF4)
- **Rank**: 16
- **Alpha**: 32
- **Dropout**: 0.05
- **Learning Rate**: 2e-4
- **Batch Size**: 1 (gradient accumulation compatible)
- **Epochs**: 3-5
### Hardware Requirements
- **Minimum**: 16GB VRAM (T4, V100)
- **Recommended**: 24GB VRAM (A5000, A6000, 4090)
- **Training Time**: ~2-4 hours (depending on dataset size)
---
## πŸ“ˆ Evaluation
### Test Suite
The model was evaluated on:
- βœ… Mathematical reasoning (arithmetic, algebra)
- βœ… Logical deduction (syllogisms, patterns)
- βœ… Creative generation (stories, poetry)
- βœ… Factual knowledge (history, science)
- βœ… Multilingual understanding
- βœ… Response consistency
### Speed Metrics
| Prompt Length | Tokens/Second | Latency |
|---------------|---------------|---------|
| Short (< 50) | 45 TPS | 1.2s |
| Medium (50-150) | 38 TPS | 1.8s |
| Long (150+) | 32 TPS | 2.5s |
---
## πŸŽ“ Training Script
Complete training script available at: [nova_hybrid_v5.py](./nova_hybrid_v5.py)
```python
from nova_hybrid_v5 import NovaHybrid, NovaConfig
config = NovaConfig(
base_model="VoidWalkercero/Nova-AGI-EXP",
reasoning_model="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
max_length=1024,
lora_r=16,
lora_alpha=32
)
nova = NovaHybrid(config)
nova.train("dataset.json", epochs=5, batch_size=1, lr=2e-4)
nova.save("./nova-mind-v5")
```
---
## 🀝 Contributions
Based on:
- [Nova-AGI-EXP](https://huggingface.co/VoidWalkercero/Nova-AGI-EXP) by VoidWalkercero
- [DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B) by DeepSeek AI
- [Qwen](https://github.com/QwenLM/Qwen) by Alibaba Cloud
---
## ⚠️ Limitations
- Response quality depends on training data quality
- May hallucinate on topics outside training distribution
- Reasoning depth limited by base model capabilities
- Best performance on topics similar to training data
---
## πŸ“„ License
Apache 2.0 License - See [LICENSE](LICENSE) file
---
## πŸ”— Links
- **GitHub**: [Repository](https://github.com/YOUR_USERNAME/nova-mind)
- **Demo**: [Try it on Spaces](https://huggingface.co/spaces/YOUR_USERNAME/nova-mind-demo)
- **Paper**: Coming soon
---
## πŸ“ž Contact
For questions or collaborations:
- HuggingFace: [@YOUR_USERNAME](https://huggingface.co/YOUR_USERNAME)
- Issues: [GitHub Issues](https://github.com/YOUR_USERNAME/nova-mind/issues)
---
<div align="center">
**Made with ❀️ using πŸ€— Transformers**
*If you find this model useful, please ⭐ star the repo!*
</div>