CoolFace
Modelpublic

Virende/Solphie-1S-Foundation-Model

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

๐Ÿง  Solphie-1S-Foundation-Model

Virende

![License](https://www.gnu.org/licenses/agpl-3.0.html)

Overview

The Solphie-1S-Foundation-Model is a fine-tuned adaptation of Meta's LLaMA 3.1 8B model, purpose-built to deliver precise, context-aware assistance for developers navigating the Solana ecosystem. Engineered with state-of-the-art instruction tuning, this model excels at:

โœ… Answering complex Solana-related queries โœ… Generating high-quality, Solana-optimized code snippets โœ… Debugging smart contracts and dApps โœ… Explaining technical blockchain concepts with clarity and depth

Designed to bridge AI intelligence with blockchain development, Solphie-1S empowers developers to build, optimize, and scale with on-chain knowledge at their fingertips.

(Knowledge cut-off date: 29th January, 2025)

๐ŸŽฏ Key Features

  • โ€”Fine-tuned with developer-first instruction tuning, optimized for Solana workflows.
  • โ€”Efficient and lightweight via LoRA (Low-Rank Adaptation), ensuring scalable fine-tuning.
  • โ€”Retains context across multi-turn conversations, enabling seamless AI-assisted development.
  • โ€”Generates complete, executable code snippets with practical real-world examples.

๐Ÿš€ Model Card

**Parameter****Details**
Base ModelMeta LLaMa 3.1 8B
Fine-Tuning FrameworkHuggingFace Transformers, LoRA
Dataset Size13,593 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           |               | Solphie-1S-Foundation-Model |
+---------------------------+               +-----------------------------+

Dataset Sources

It is built over Virende-Novel-Instruct dataset, refer to this page for more details.


๐Ÿ› ๏ธ Installation and Usage

1. Installation

bash
pip install transformers datasets peft wandb

2. Load the Model

python
from transformers import LlamaForCausalLM, AutoTokenizer

model_name = "Virende/Solphie-1S-Foundation-Model"

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 Virende, a helpful assistant."},
    {"role": "user", "content": "Explain how to interact with Raydium API for token swaps."}
])
print(response)

๐Ÿ“‚ Dataset

SplitCountDescription
Train13.6kHigh-quality Q&A pairs

Dataset Format (JSONL):

json
{
  "question": "How to ...",
  "answer": "...",
  "think": "..."
}

๐Ÿ” 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.

๐Ÿ™Œ Contributing

We welcome contributions to enhance the Solphie-1S Foundation 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.