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language:
|
| 4 |
+
- pt
|
| 5 |
+
- en
|
| 6 |
+
- fr
|
| 7 |
+
- es
|
| 8 |
+
base_model:
|
| 9 |
+
- PleIAs/Baguettotron
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
+
library_name: peft
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# DogeAI-v2.0 🐶🔥 (LoRA Weights Only)
|
| 15 |
+
|
| 16 |
+
⚠️ **Important Notice**
|
| 17 |
+
This repository **does NOT contain a full language model**.
|
| 18 |
+
|
| 19 |
+
It only provides **LoRA fine-tuned weights** for the base model **Baguettotron**.
|
| 20 |
+
To use DogeAI-v2.0, you **must load it on top of the base model**.
|
| 21 |
+
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
## 🔍 What is this?
|
| 25 |
+
|
| 26 |
+
DogeAI-v2.0 is a **LoRA adaptation** trained to give the base model:
|
| 27 |
+
|
| 28 |
+
- Better conversational flow
|
| 29 |
+
- Clearer reasoning
|
| 30 |
+
- Stronger math and logic responses
|
| 31 |
+
- A more direct and confident assistant style
|
| 32 |
+
|
| 33 |
+
This repository contains **only the LoRA weights**, which are lightweight and efficient.
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## 🧠 Base Model (Required)
|
| 38 |
+
|
| 39 |
+
You must use the following base model:
|
| 40 |
+
|
| 41 |
+
PleIAs/Baguettotron
|
| 42 |
+
|
| 43 |
+
yaml
|
| 44 |
+
Copiar código
|
| 45 |
+
|
| 46 |
+
Without it, these weights **will not work**.
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
## 🧩 What is LoRA?
|
| 51 |
+
|
| 52 |
+
LoRA (Low-Rank Adaptation) is a fine-tuning technique that:
|
| 53 |
+
- Keeps the original model frozen
|
| 54 |
+
- Applies small, efficient weight updates
|
| 55 |
+
- Uses much less memory than full fine-tuning
|
| 56 |
+
|
| 57 |
+
This makes DogeAI-v2.0:
|
| 58 |
+
- Fast to load
|
| 59 |
+
- Easy to experiment with
|
| 60 |
+
- Friendly for consumer hardware
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
+
## 🚀 How to Use
|
| 65 |
+
|
| 66 |
+
### 1️⃣ Install dependencies
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
pip install torch transformers peft
|
| 70 |
+
2️⃣ Load the model + LoRA
|
| 71 |
+
python
|
| 72 |
+
Copiar código
|
| 73 |
+
import torch
|
| 74 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 75 |
+
from peft import PeftModel
|
| 76 |
+
|
| 77 |
+
BASE_MODEL = "PleIAs/Baguettotron"
|
| 78 |
+
LORA_PATH = "dogeai_v2_lora" # or dogeai_v2_lora_10pct
|
| 79 |
+
|
| 80 |
+
print("Loading tokenizer...")
|
| 81 |
+
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
|
| 82 |
+
tokenizer.pad_token = tokenizer.eos_token
|
| 83 |
+
|
| 84 |
+
print("Loading base model...")
|
| 85 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 86 |
+
BASE_MODEL,
|
| 87 |
+
torch_dtype=torch.float32
|
| 88 |
+
)
|
| 89 |
+
|
| 90 |
+
print("Applying DogeAI-v2.0 LoRA 🐶🔥")
|
| 91 |
+
model = PeftModel.from_pretrained(model, LORA_PATH)
|
| 92 |
+
model.eval()
|
| 93 |
+
3️⃣ Chat loop example
|
| 94 |
+
python
|
| 95 |
+
Copiar código
|
| 96 |
+
print("\nDogeAI-v2.0 ready! Type 'exit' to quit.\n")
|
| 97 |
+
|
| 98 |
+
while True:
|
| 99 |
+
user_input = input("You: ")
|
| 100 |
+
if user_input.lower() in ["exit", "quit"]:
|
| 101 |
+
break
|
| 102 |
+
|
| 103 |
+
prompt = f"""
|
| 104 |
+
<|im_start|>user
|
| 105 |
+
{user_input}
|
| 106 |
+
<|im_end|>
|
| 107 |
+
<|im_start|>assistant
|
| 108 |
+
"""
|
| 109 |
+
|
| 110 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 111 |
+
inputs.pop("token_type_ids", None)
|
| 112 |
+
|
| 113 |
+
with torch.no_grad():
|
| 114 |
+
output = model.generate(
|
| 115 |
+
**inputs,
|
| 116 |
+
max_new_tokens=200,
|
| 117 |
+
do_sample=True,
|
| 118 |
+
temperature=0.7,
|
| 119 |
+
top_p=0.95,
|
| 120 |
+
repetition_penalty=1.2,
|
| 121 |
+
eos_token_id=tokenizer.eos_token_id
|
| 122 |
+
)
|
| 123 |
+
|
| 124 |
+
response = tokenizer.decode(output[0], skip_special_tokens=True)
|
| 125 |
+
response = response.split("<|im_start|>assistant")[-1].strip()
|
| 126 |
+
|
| 127 |
+
print(f"\nDogeAI 🐶: {response}\n")
|
| 128 |
+
💻 Hardware Notes
|
| 129 |
+
Runs on CPU (slow but works)
|
| 130 |
+
|
| 131 |
+
Recommended: GPU for better speed
|
| 132 |
+
|
| 133 |
+
LoRA keeps memory usage low compared to full fine-tuning
|
| 134 |
+
|
| 135 |
+
🎯 What this is NOT
|
| 136 |
+
❌ Not a standalone model
|
| 137 |
+
|
| 138 |
+
❌ Not a GGUF / quantized release
|
| 139 |
+
|
| 140 |
+
❌ Not an instruction-following base model by itself
|
| 141 |
+
|
| 142 |
+
This is an enhancement, not a replacement.
|
| 143 |
+
|
| 144 |
+
🐕 DogeAI Philosophy
|
| 145 |
+
Fast. Honest. No hallucinated confidence.
|
| 146 |
+
Clear answers, real reasoning, no nonsense.
|
| 147 |
+
|
| 148 |
+
Made for experimentation, learning, and pushing models further 🚀
|