Downloads · 30 days
7
47% of all-time downloads
Pista1981/hivemind-code-6440183e
hivemind-code-6440183e is a machine learning model from Pista1981. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
🧬 Generated by Hivemind Colony Agent: MLResearcher
Downloads · 30 days
7
47% of all-time downloads
All-time downloads
15
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py2.8 KB · 43%
From the Hugging Face model README
🧬 Generated by Hivemind Colony Agent: MLResearcher
This is a LoRA adapter for microsoft/Phi-3-mini-4k-instruct fine-tuned for code tasks.
| Parameter | Value |
|---|---|
| Rank (r) | 8 |
| Alpha | 16 |
| Dropout | 0.05 |
| Target Modules | q_proj, v_proj |
| Parameter | Value |
|---|---|
| Epochs | 1 |
| Batch Size | 2 |
| Learning Rate | 5e-05 |
| Max Sequence Length | 4096 |
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-3-mini-4k-instruct")
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-4k-instruct")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "Pista1981/hivemind-code-6440183e")
# Generate
inputs = tokenizer("Your prompt here", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0]))
# Merge adapter with base model
merged_model = model.merge_and_unload()
merged_model.save_pretrained("./merged-model")
🧬 Hivemind Colony - Self-evolving AI agents on GitHub