Introducing OpenPeerLLM ~ Grammar, Distributed-Computing, and Contextual LLM for Text Generation
Last week, we had the pleasure of uploading the first model for the OpenPeerAI family of models to HuggingFace. The OpenPeerAI project is brought about by Riemann Computing, and aims to bring about distributed, safe, and innovative machine learning to the masses.
Own LLM model is a work in progress:
- OpenPeerLLM: https://huggingface.co/OpenPeerAI/OpenPeerLLM
- Base Model Notebook: https://www.kaggle.com/models/openpeer-ai/openpeerllm/pyTorch/default, https://www.kaggle.com/code/quantportal/openpeerllm-base-notebook
- v1 Python Release: https://github.com/OpenPeer-AI/OpenPeerLLM/releases/tag/v1
- Cloud Agents: https://huggingface.co/OpenPeerAI/Cloud-Agents
We believe this can allow us to become a serious player within the machine learning space by introducing decentralized, grid-based verifiable computing to scalable machine learning, LLMs and reindexing.
So what does OpenPeerLLM do?
OpenPeerLLM is meant to be a scalable contextual-base LLM model that can be utilized for grid-based learning and contextual text generation. This is the first, non-fine-tuned base model for the OpenPeerAI family.
from src.model import DecentralizedLLM
from src.grammar import LonScriptGrammar
# Initialize the model
model = DecentralizedLLM()
grammar = LonScriptGrammar()
# Use the model for inference
response = model.reason("context", "query")
OpenPeerLLM implements DecentTorch, Huggingface Transformers, BOINC, and the decentralized-internet SDK.
How effective is OpenPeerLLM?
The model is trained on the awesome-chatgpt-prompts dataset.
- Architecture: 12-layer transformer with 768 hidden dimensions and 12 attention heads
- Optimizer: AdamW with learning rate 5e-5
- Batch Size: 8
- Training Steps: 10,000
- Warmup Steps: 1,000
- Hardware: Distributed across peer network nodes
Evaluation Results
Initial testing shows promising results:
- Final Epoch: 2
- Model Size: 1.82 GB
- Total Run Time: 2.5 minutes on Intel UHD Graphics 630
- Loss: 7.11
- Accuracy: 78.5%
- Response Coherence: 82.1%
- There are other meterics as well, as noted in the actual model's README.
What are the next steps for OpenPeerLLM?
We have created a repository for Cloud Agents along with an example notebook on Kaggle which will allow for people to start fine-tuning the OpenPeerLLM and create their own instances locally. We also hope to create our own custom trainer, along with publishing fine-tuned models, graphical interfaces, etc. depending on community support. Right now this is in beta, and this is just a preview of what OpenPeerAI is developing. Our main goal is to create distributed and safe machine learning for all.
How do you download the OpenPeerLLM Model?
You can use the model or download directly via HuggingFace or you can import/download through Kaggle:
import os
import kagglehub
from pathlib import Path
print("Setting up model directories...")
model_dir = Path('models/openpeerllm/checkpoints')
model_dir.mkdir(parents=True, exist_ok=True)
print("\nDownloading the model...")
try:
# Download model using kagglehub
path = kagglehub.model_download("openpeer-ai/openpeerllm/pyTorch/default")
print(f"Model downloaded successfully at: {path}")
# Print directory contents
print("\nChecking downloaded content:")
if os.path.exists(path):
print(f"\nContents of downloaded model path:")
for item in os.listdir(path):
print(f"- {item}")
else:
print("Model path not found")
except Exception as e:
print(f"Error during model setup: {str(e)}")
This will allow you to actually import the 'best-model.pt' as a base. Keep in mind, the dataset utilized is very limited, so you can actually import far more data, mess with weights, and utilize parameterization to expand accross the OpenPeerLLM.
Who is responsible for the development of OpenPeerLLM?
Riemann Computing started the OpenPeerLLM project and mantains the OpenPeerAI website. This project started as a passion project by Riemann Computing's founder, Andrew Magdy Kamal (Nassief).
