Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- llama
|
| 8 |
+
- llama3
|
| 9 |
+
- causal-lm
|
| 10 |
+
- instruction-tuned
|
| 11 |
+
- hf-internal-testing
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# 🦙 LLaMA3.2-1B-Instruct
|
| 16 |
+
|
| 17 |
+
`pAce576/llama3.2-1b-Instruct` is a 1.2 billion parameter language model based on Meta's LLaMA3 architecture. This model has been instruction-tuned for conversational and general-purpose natural language generation tasks.
|
| 18 |
+
|
| 19 |
+
## 🧠 Model Details
|
| 20 |
+
|
| 21 |
+
- **Architecture**: LLaMA3.2 (custom 1.2B variant)
|
| 22 |
+
- **Base Model**: LLaMA3-like Transformer
|
| 23 |
+
- **Instruction Tuning**: Yes
|
| 24 |
+
- **Parameters**: ~1.2 billion
|
| 25 |
+
- **Layers**: Custom, designed for efficient inference on resource-constrained environments
|
| 26 |
+
- **Precision**: fp16 supported (also tested with int8/4-bit via quantization)
|
| 27 |
+
|
| 28 |
+
## 📚 Intended Use
|
| 29 |
+
|
| 30 |
+
This model is intended for:
|
| 31 |
+
|
| 32 |
+
- Dialogue generation
|
| 33 |
+
- Instruction following
|
| 34 |
+
- Story writing
|
| 35 |
+
- Light reasoning tasks
|
| 36 |
+
|
| 37 |
+
**Example usage:**
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 41 |
|
| 42 |
+
model = AutoModelForCausalLM.from_pretrained("pAce576/llama3.2-1b-Instruct")
|
| 43 |
+
tokenizer = AutoTokenizer.from_pretrained("pAce576/llama3.2-1b-Instruct")
|
| 44 |
+
|
| 45 |
+
prompt = "Explain gravity to a 5-year-old."
|
| 46 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 47 |
+
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 48 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|