update
Browse files
README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# tinyllama-1.1b
|
| 2 |
+
|
| 3 |
+
## Overview
|
| 4 |
+
`tinyllama-1.1b` is a compact and efficient transformer-based model designed for high-performance language tasks. It is optimized for resource-constrained environments while maintaining robust accuracy across a variety of natural language processing benchmarks.
|
| 5 |
+
|
| 6 |
+
### Features
|
| 7 |
+
- **Size**: 1.1 billion parameters
|
| 8 |
+
- **Efficiency**: Designed for low-latency inference
|
| 9 |
+
- **Compatibility**: Easily extendable with techniques like LoRA for fine-tuning
|
| 10 |
+
|
| 11 |
+
### Usage
|
| 12 |
+
To load and use the base model, you can use the following code snippet:
|
| 13 |
+
|
| 14 |
+
```python
|
| 15 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 16 |
+
|
| 17 |
+
# Load the base model
|
| 18 |
+
base_model_path = "path/to/tinyllama-1.1b"
|
| 19 |
+
model = AutoModelForCausalLM.from_pretrained(base_model_path)
|
| 20 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model_path)
|
| 21 |
+
|
| 22 |
+
# Example usage
|
| 23 |
+
inputs = tokenizer("Hello, world!", return_tensors="pt")
|
| 24 |
+
outputs = model.generate(inputs["input_ids"])
|
| 25 |
+
print(tokenizer.decode(outputs[0]))
|