CoolFace
Modelpublic

kasterkeqi/Lumo-8B-Fork-Sol-Copilot

sourceHugging Faceagpl-3.0updated 2y agoView on Hugging Face
0likes105downloads
Model Card

๐Ÿง  Lumo-8B-Instruct Model

Lumo

![Lumo-8B-DS-Instruct](https://huggingface.co/datasets/lumolabs-ai/Lumo-8B-DS-Instruct) ![License](https://www.gnu.org/licenses/agpl-3.0.html) ![HF](https://huggingface.co/lumolabs-ai/Lumo-8B-Instruct)

Overview

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)

๐ŸŽฏ Key Features

  • โ€”Optimized for Solana-specific queries across ecosystems like Raydium, Helius, Jito, and more.
  • โ€”Instruction fine-tuned for developer-centric workflows.
  • โ€”Lightweight parameter-efficient fine-tuning via LoRA (Low-Rank Adaptation).
  • โ€”Supports multi-turn conversations with context retention.
  • โ€”Outputs complete code snippets and real-world usage examples.

๐Ÿš€ Model Card

**Parameter****Details**
Base ModelMeta LLaMa 3.1 8B
Fine-Tuning FrameworkHuggingFace Transformers, LoRA
Dataset Size28,518 high-quality Q&A pairs
Context Length4,096 tokens
Training Steps10,000
Learning Rate3e-4
Batch Size1 per GPU with gradient accumulation
Epochs2
Model Size8 billion parameters (adapter size ~10 MB)
Pre-trained TasksInstruction following, Code generation, Debugging, Multi-turn Q&A

๐Ÿ“Š Model Architecture

Training Workflow

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        |
+---------------------------+               +-------------------------+

Dataset Sources

The dataset comprises curated documentation, cookbooks, and API references from the following sources:

SourceLinks
Solana DocsDocumentation, Cookbook
Raydium DocsDocumentation
HeliusDocs
QuickNodeDocs
Magic EdenDocs

๐Ÿ› ๏ธ Installation and Usage

1. Installation

bash
pip install transformers datasets peft wandb

2. Load the Model

python
from transformers import LlamaForCausalLM, AutoTokenizer

model_name = "lumolabs-ai/Lumo-8B-Instruct"

model = LlamaForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

3. Run 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.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)

๐Ÿ“ˆ Performance

**Metric****Value**
Validation Loss1.73
BLEU Score89%
Code Accuracy92%
Token Efficiency~4,096 tokens max

Fine-Tuning Loss Graph

Loss Graph


๐Ÿ“‚ Dataset

SplitCountDescription
Train27.1kHigh-quality Q&A pairs
Test1.43kEvaluation dataset for testing

Dataset Format (JSONL):

json
{
  "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 ..."
}

๐Ÿ” Technical Insights

LoRA Configuration

  • โ€”Rank: 8
  • โ€”Alpha: 32
  • โ€”Dropout: 0.01
  • โ€”Adapter Size: ~10 MB

Optimization

  • โ€”Mixed Precision (FP16) for faster inference.
  • โ€”Gradient Accumulation for memory efficiency.
  • โ€”Parameter-efficient tuning to preserve base model knowledge.

๐ŸŒŸ Try the model

๐Ÿš€ Lumo-8B-Instruct Inferencing


๐Ÿ™Œ Contributing

We welcome contributions to enhance the Lumo-8B-Instruct model. Feel free to:

  • โ€”Share your feedback on the HuggingFace Model Hub.

๐Ÿ“œ License

This model is licensed under the GNU Affero General Public License v3.0 (AGPLv3).


๐Ÿ“ž Community

For questions or support, reach out via:


๐Ÿค Acknowledgments

Special thanks to the Solana ecosystem developers and the open-source community for their invaluable contributions and support.