Downloads · 30 days
9
32% of all-time downloads
Pista1981/hivemind-instruct-587c9d19
hivemind-instruct-587c9d19 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
9
32% of all-time downloads
All-time downloads
28
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 google/gemma-2-2b-it fine-tuned for instruct tasks.
| Parameter | Value |
|---|---|
| Rank (r) | 32 |
| Alpha | 64 |
| Dropout | 0.1 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Parameter | Value |
|---|---|
| Epochs | 2 |
| Batch Size | 8 |
| Learning Rate | 0.0001 |
| Max Sequence Length | 1024 |
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("google/gemma-2-2b-it")
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "Pista1981/hivemind-instruct-587c9d19")
# 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