File size: 1,805 Bytes
0ab7ab0 a97d8aa 0ab7ab0 da4d410 0ab7ab0 21541f1 0ab7ab0 da4d410 0ab7ab0 da4d410 0ab7ab0 da4d410 8e8b72d 0ab7ab0 da4d410 0ab7ab0 21541f1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
---
library_name: transformers
tags:
- ultrachat
datasets:
- HuggingFaceH4/ultrachat_200k
base_model:
- TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
---
# Model Card for Model ID
This is quantized adapters trained on the Ultrachat 200k dataset for the TinyLlama-1.1B Intermediate Step 1431k 3T model.
```python
adapter_name = 'iqbalamo93/TinyLlama-1.1B-intermediate-1431k-3T-adapters-ultrachat'
```
## Model Details
Base model was quantized using BitsAndBytes
```python
from bitsandbytes import BitsAndBytesConfig
bnb_config = BitsAndBytesConfig(
load_in_4bit=True, # Use 4-bit precision model loading
bnb_4bit_quant_type="nf4", # Quantization type
bnb_4bit_compute_dtype="float16", # Compute data type
bnb_4bit_use_double_quant=True # Apply nested quantization
)
```
### Model Description
This is quantized adapters trained on the Ultrachat 200k dataset for the TinyLlama-1.1B Intermediate Step 1431k 3T model.
- Finetuned from model : [TinyLlama](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T)
### How to use
#### Method 1: Direct loading
```python
from peft import PeftModel, AutoPeftModelForCausalLM
from transformers import pipeline, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
adapter_name = 'iqbalamo93/TinyLlama-1.1B-intermediate-1431k-3T-adapters-ultrachat'
model = AutoPeftModelForCausalLM.from_pretrained(
adapter_name,
device_map="auto"
)
model = model.merge_and_unload()
prompt = """<|user|>
Tell me something about Large Language Models.</s>
<|assistant|>
"""
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer)
print(pipe(prompt)[0]["generated_text"])
```
#### Method 2: Merging with base mode explicitly
todo |