Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,29 +1,43 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
They auto-load the base model via AutoPEFT. Example:
|
| 5 |
|
| 6 |
-
|
| 7 |
-
from peft import AutoPeftModelForCausalLM
|
| 8 |
-
from transformers import AutoTokenizer
|
| 9 |
-
import torch, os
|
| 10 |
-
|
| 11 |
-
MODEL_ID = "SomyaSaraswati/uncle-l3-8b-merged-v3"
|
| 12 |
-
BASE_ID = "meta-llama/Meta-Llama-3.1-8B-Instruct"
|
| 13 |
-
HF_TOKEN = os.getenv('HF_TOKEN')
|
| 14 |
-
|
| 15 |
-
tok = AutoTokenizer.from_pretrained(BASE_ID, token=HF_TOKEN, use_fast=True)
|
| 16 |
-
if tok.pad_token is None: tok.pad_token = tok.eos_token
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
print(tok.decode(out[0], skip_special_tokens=True))
|
| 29 |
-
```
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: llama3
|
| 3 |
+
base_model: UNKNOWN
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- llama
|
| 8 |
+
- merged-weights
|
| 9 |
+
- career-mentor
|
| 10 |
+
- automation
|
| 11 |
+
- sft
|
| 12 |
+
- peft-merged
|
| 13 |
+
datasets:
|
| 14 |
+
- SomyaSaraswati/uncle-sft-50k-clean
|
| 15 |
+
language: [en]
|
| 16 |
+
---
|
| 17 |
|
| 18 |
+
# Uncle L3 8B — merged
|
|
|
|
| 19 |
|
| 20 |
+
Concise, practical career mentor for AI/automation. Fully merged weights (base + LoRA).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
## Chat template
|
| 23 |
+
```
|
| 24 |
+
<|system|>
|
| 25 |
+
You are Uncle: a concise, practical career mentor for AI/automation.
|
| 26 |
+
<|user|>
|
| 27 |
+
How do I move from Python dev to MLOps in 30 days?
|
| 28 |
+
<|assistant|>
|
| 29 |
+
```
|
| 30 |
|
| 31 |
+
## Quick start (Transformers)
|
| 32 |
+
```python
|
| 33 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 34 |
+
import torch
|
| 35 |
+
repo = "SomyaSaraswati/uncle-l3-8b-merged-v3"
|
| 36 |
+
tok = AutoTokenizer.from_pretrained(repo, use_fast=True)
|
| 37 |
+
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype=torch.float16, device_map='auto')
|
| 38 |
+
prompt = "<|system|>You are Uncle...<|user|>Give me a 30-day MLOps plan.<|assistant|>"
|
| 39 |
+
out = model.generate(**tok(prompt, return_tensors='pt').to(model.device), max_new_tokens=256, temperature=0.7, top_p=0.9)
|
| 40 |
print(tok.decode(out[0], skip_special_tokens=True))
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
> If your base is Meta Llama 3, keep this repo **private** or enable **Gated** access to comply with the license.
|