71 Downloads Updated 7 months ago
Updated 7 months ago
7 months ago
b14f902e7c15 Β· 4.7GB
The Lumo-8B-Instruct model is a fine-tuned version of Metaβs LLaMa 3.1 8B model designed to provide highly accurate and contextual assistance for developers working on Solana and its associated ecosystems. This model is capable of answering complex questions, generating code snippets, debugging, and explaining technical concepts using state-of-the-art instruction tuning techniques.
(Knowledge cut-off date: 17th January, 2025)
Parameter | Details |
---|---|
Base Model | Meta LLaMa 3.1 8B |
Fine-Tuning Framework | HuggingFace Transformers, LoRA |
Dataset Size | 28,518 high-quality Q&A pairs |
Context Length | 4,096 tokens |
Training Steps | 10,000 |
Learning Rate | 3e-4 |
Batch Size | 1 per GPU with gradient accumulation |
Epochs | 2 |
Model Size | 8 billion parameters (adapter size ~10 MB) |
Pre-trained Tasks | Instruction following, Code generation, Debugging, Multi-turn Q&A |
The model was fine-tuned using parameter-efficient methods with LoRA to adapt to the Solana-specific domain. Below is a visualization of the training process:
+---------------------------+ +-------------------------+
| Base Model | --- LoRA -->| Fine-Tuned Adapter |
| LLaMa 3.1 8B | | Lumo-8B-Instruct |
+---------------------------+ +-------------------------+
The dataset comprises curated documentation, cookbooks, and API references from the following sources:
Source | Links |
---|---|
Solana Docs | Documentation, Cookbook |
Raydium Docs | Documentation |
Helius | Docs |
QuickNode | Docs |
Magic Eden | Docs |
pip install transformers datasets peft wandb
from transformers import LlamaForCausalLM, AutoTokenizer
model_name = "lumolabs-ai/Lumo-8B-Instruct"
model = LlamaForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
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.no_grad():
outputs = model.generate(**inputs, max_new_tokens=max_new_tokens)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
response = complete_chat(model, tokenizer, [
{"role": "system", "content": "You are Lumo, a helpful assistant."},
{"role": "user", "content": "Explain how to interact with Raydium API for token swaps."}
])
print(response)
Metric | Value |
---|---|
Validation Loss | 1.73 |
BLEU Score | 89% |
Code Accuracy | 92% |
Token Efficiency | ~4,096 tokens max |
Split | Count | Description |
---|---|---|
Train | 27.1k | High-quality Q&A pairs |
Test | 1.43k | Evaluation dataset for testing |
Dataset Format (JSONL):
{
"question": "How to use the Helius API for transaction indexing?",
"answer": "To index transactions, use Helius's Webhooks API ...",
"chunk": "Helius API allows you to set up ..."
}
π Lumo-8B-Instruct Inferencing
We welcome contributions to enhance the Lumo-8B-Instruct model. Feel free to: - Share your feedback on the HuggingFace Model Hub.
This model is licensed under the GNU Affero General Public License v3.0 (AGPLv3).
For questions or support, reach out via: - Twitter: Lumo Labs
Special thanks to the Solana ecosystem developers and the open-source community for their invaluable contributions and support.