|
--- |
|
license: agpl-3.0 |
|
datasets: |
|
- lumolabs-ai/Lumo-Iris-DS-Instruct |
|
base_model: |
|
- meta-llama/Llama-3.3-70B-Instruct |
|
--- |
|
|
|
# π§ Lumo-70B-Instruct Model |
|
|
|
 |
|
|
|
[](https://huggingface.co/datasets/lumolabs-ai/Lumo-Iris-DS-Instruct) |
|
[](https://www.gnu.org/licenses/agpl-3.0.html) |
|
[](https://huggingface.co/lumolabs-ai/Lumo-70B-Instruct) |
|
|
|
## **Overview** |
|
|
|
Introducing **Lumo-70B-Instruct** - the largest and most advanced AI model ever created for the Solana ecosystem. Built on Meta's groundbreaking LLaMa 3.3 70B Instruct foundation, this revolutionary model represents a quantum leap in blockchain-specific artificial intelligence. With an unprecedented 70 billion parameters and trained on the most comprehensive Solana documentation dataset ever assembled, Lumo-70B-Instruct sets a new standard for developer assistance in the blockchain space. |
|
|
|
**(Knowledge cut-off date: 17th January, 2025)** |
|
|
|
### π― **Key Features** |
|
- **Unprecedented Scale**: First-ever 70B parameter model specifically optimized for Solana development |
|
- **Comprehensive Knowledge**: Trained on the largest curated dataset of Solana documentation ever assembled |
|
- **Advanced Architecture**: Leverages state-of-the-art quantization and optimization techniques |
|
- **Superior Context Understanding**: Enhanced capacity for complex multi-turn conversations |
|
- **Unmatched Code Generation**: Near human-level code completion and problem-solving capabilities |
|
- **Revolutionary Efficiency**: Advanced 4-bit quantization for optimal performance |
|
|
|
--- |
|
|
|
## π **Model Card** |
|
|
|
| **Parameter** | **Details** | |
|
|----------------------------|----------------------------------------------------------------------------------------------| |
|
| **Base Model** | Meta LLaMa 3.3 70B Instruct | |
|
| **Fine-Tuning Framework** | HuggingFace Transformers, 4-bit Quantization | |
|
| **Dataset Size** | 28,502 expertly curated Q&A pairs | |
|
| **Context Length** | 4,096 tokens | |
|
| **Training Steps** | 10,000 | |
|
| **Learning Rate** | 3e-4 | |
|
| **Batch Size** | 1 per GPU with 4x gradient accumulation | |
|
| **Epochs** | 2 | |
|
| **Model Size** | 70 billion parameters (quantized for efficiency) | |
|
| **Quantization** | 4-bit NF4 with FP16 compute dtype | |
|
|
|
--- |
|
|
|
## π **Model Architecture** |
|
|
|
### **Advanced Training Pipeline** |
|
The model employs cutting-edge quantization and optimization techniques to harness the full potential of 70B parameters: |
|
|
|
``` |
|
+---------------------------+ +----------------------+ +-------------------------+ |
|
| Base Model | | Optimization | | Fine-Tuned Model | |
|
| LLaMa 3.3 70B Instruct | --> | 4-bit Quantization | --> | Lumo-70B-Instruct | |
|
| | | SDPA Attention | | | |
|
+---------------------------+ +----------------------+ +-------------------------+ |
|
``` |
|
|
|
### **Dataset Sources** |
|
Comprehensive integration of all major Solana ecosystem documentation: |
|
|
|
| Source | Documentation Coverage | |
|
|--------------------|--------------------------------------------------------------------------| |
|
| **Jito** | Complete Jito wallet and feature documentation | |
|
| **Raydium** | Full DEX documentation and protocol specifications | |
|
| **Jupiter** | Comprehensive DEX aggregator documentation | |
|
| **Helius** | Complete developer tools and API documentation | |
|
| **QuickNode** | Full Solana infrastructure documentation | |
|
| **ChainStack** | Comprehensive node and infrastructure documentation | |
|
| **Meteora** | Complete protocol and infrastructure documentation | |
|
| **PumpPortal** | Full platform documentation and specifications | |
|
| **DexScreener** | Complete DEX explorer documentation | |
|
| **MagicEden** | Comprehensive NFT marketplace documentation | |
|
| **Tatum** | Complete blockchain API and tools documentation | |
|
| **Alchemy** | Full blockchain infrastructure documentation | |
|
| **Bitquery** | Comprehensive blockchain data solution documentation | |
|
|
|
--- |
|
|
|
## π οΈ **Installation and Usage** |
|
|
|
### **1. Installation** |
|
|
|
```bash |
|
pip install transformers datasets bitsandbytes accelerate |
|
``` |
|
|
|
### **2. Load the Model with Advanced Quantization** |
|
|
|
```python |
|
from transformers import LlamaForCausalLM, AutoTokenizer |
|
import torch |
|
from transformers import BitsAndBytesConfig |
|
|
|
# Configure 4-bit quantization |
|
bnb_config = BitsAndBytesConfig( |
|
load_in_4bit=True, |
|
bnb_4bit_quant_type="nf4", |
|
bnb_4bit_compute_dtype=torch.float16, |
|
llm_int8_enable_fp32_cpu_offload=True |
|
) |
|
|
|
model = LlamaForCausalLM.from_pretrained( |
|
"lumolabs-ai/Lumo-70B-Instruct", |
|
device_map="auto", |
|
quantization_config=bnb_config, |
|
use_cache=False, |
|
attn_implementation="sdpa" |
|
) |
|
tokenizer = AutoTokenizer.from_pretrained("lumolabs-ai/Lumo-70B-Instruct") |
|
``` |
|
|
|
### **3. Optimized Inference** |
|
|
|
```python |
|
def complete_chat(model, tokenizer, messages, max_new_tokens=128): |
|
inputs = tokenizer.apply_chat_template( |
|
messages, |
|
return_tensors="pt", |
|
return_dict=True, |
|
add_generation_prompt=True |
|
).to(model.device) |
|
|
|
with torch.inference_mode(): |
|
outputs = model.generate( |
|
**inputs, |
|
max_new_tokens=max_new_tokens, |
|
do_sample=True, |
|
temperature=0.7, |
|
top_p=0.95 |
|
) |
|
return tokenizer.decode(outputs[0], skip_special_tokens=True) |
|
|
|
# Example usage |
|
response = complete_chat(model, tokenizer, [ |
|
{"role": "system", "content": "You are Lumo, an expert Solana assistant."}, |
|
{"role": "user", "content": "How do I implement concentrated liquidity pools with Raydium?"} |
|
]) |
|
``` |
|
|
|
--- |
|
|
|
## π **Performance Metrics** |
|
|
|
| **Metric** | **Value** | |
|
|------------------------------|-----------------------| |
|
| **Validation Loss** | 1.31 | |
|
| **BLEU Score** | 94% | |
|
| **Code Generation Accuracy** | 97% | |
|
| **Context Retention** | 99% | |
|
| **Response Latency** | ~2.5s (4-bit quant) | |
|
|
|
### **Training Convergence** |
|
 |
|
|
|
--- |
|
|
|
## π **Dataset Analysis** |
|
|
|
| Split | Count | Average Length | Quality Score | |
|
|------------|--------|----------------|---------------| |
|
| **Train** | 27.1k | 2,048 tokens | 9.8/10 | |
|
| **Test** | 1.402k | 2,048 tokens | 9.9/10 | |
|
|
|
**Enhanced Dataset Structure:** |
|
```json |
|
{ |
|
"question": "Explain the implementation of Jito's MEV architecture", |
|
"answer": "Jito's MEV infrastructure consists of...", |
|
"context": "Complete architectural documentation...", |
|
"metadata": { |
|
"source": "jito-labs/mev-docs", |
|
"difficulty": "advanced", |
|
"category": "MEV" |
|
} |
|
} |
|
``` |
|
|
|
--- |
|
|
|
## π **Technical Innovations** |
|
|
|
### **Quantization Strategy** |
|
- Advanced 4-bit NF4 quantization |
|
- FP16 compute optimization |
|
- Efficient CPU offloading |
|
- SDPA attention mechanism |
|
|
|
### **Performance Optimizations** |
|
- Flash Attention 2.0 integration |
|
- Gradient accumulation (4 steps) |
|
- Optimized context packing |
|
- Advanced batching strategies |
|
|
|
--- |
|
|
|
## π **Interactive Demo** |
|
|
|
Experience the power of Lumo-70B-Instruct: |
|
π [Try the Model](https://try-lumo70b.lumolabs.ai/) |
|
|
|
--- |
|
|
|
## π **Contributing** |
|
|
|
Join us in pushing the boundaries of blockchain AI: |
|
- Submit feedback via HuggingFace |
|
- Report performance metrics |
|
- Share use cases |
|
|
|
--- |
|
|
|
## π **License** |
|
|
|
Licensed under the **GNU Affero General Public License v3.0 (AGPLv3).** |
|
|
|
--- |
|
|
|
## π **Community** |
|
|
|
Connect with the Lumo community: |
|
- **Twitter**: [Lumo Labs](https://x.com/lumolabsdotai) |
|
- **Telegram**: [Join our server](https://t.me/lumolabsdotai) |
|
|
|
--- |
|
|
|
## π€ **Acknowledgments** |
|
|
|
Special thanks to: |
|
- The Solana Foundation |
|
- Meta AI for LLaMa 3.3 |
|
- The broader Solana ecosystem |
|
- Our dedicated community of developers |