Add model card and documentation
Browse files
README.md
CHANGED
@@ -1,3 +1,46 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: HuggingFaceTB/SmolLM2-1.7B-Instruct
|
4 |
+
tags:
|
5 |
+
- text-generation
|
6 |
+
- conversational
|
7 |
+
- character-ai
|
8 |
+
- philosophy
|
9 |
+
- fine-tuned
|
10 |
+
- peft
|
11 |
+
- lora
|
12 |
+
language:
|
13 |
+
- en
|
14 |
+
pipeline_tag: text-generation
|
15 |
+
---
|
16 |
+
|
17 |
+
# 🐸 Duncan Gamabunta v3.0 - Philosophical Frog AI
|
18 |
+
|
19 |
+
## Model Description
|
20 |
+
Duncan Gamabunta is a fine-tuned SmolLM 1.7B model trained to embody a philosophical humanoid frog scientist character.
|
21 |
+
|
22 |
+
## Training Details
|
23 |
+
- **Base Model**: HuggingFaceTB/SmolLM2-1.7B-Instruct
|
24 |
+
- **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
|
25 |
+
- **Dataset Size**: 62 training examples, 7 validation examples
|
26 |
+
- **Training Epochs**: 7
|
27 |
+
|
28 |
+
## Usage
|
29 |
+
```python
|
30 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
31 |
+
from peft import PeftModel
|
32 |
+
|
33 |
+
# Load base model and tokenizer
|
34 |
+
base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM2-1.7B-Instruct")
|
35 |
+
tokenizer = AutoTokenizer.from_pretrained("tuc111/duncan-gamabunta-v3.0")
|
36 |
+
|
37 |
+
# Load the fine-tuned adapter
|
38 |
+
model = PeftModel.from_pretrained(base_model, "tuc111/duncan-gamabunta-v3.0")
|
39 |
+
|
40 |
+
# Generate response
|
41 |
+
prompt = "<|im_start|>user\nHi Duncan!<|im_end|>\n<|im_start|>assistant\n"
|
42 |
+
inputs = tokenizer.encode(prompt, return_tensors="pt")
|
43 |
+
outputs = model.generate(inputs, max_new_tokens=150, temperature=0.7, do_sample=True)
|
44 |
+
response = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)
|
45 |
+
print(response)
|
46 |
+
```
|