Text Generation
Transformers
TensorBoard
Safetensors
falcon
alignment-handbook
trl
sft
Generated from Trainer
conversational
custom_code
text-generation-inference
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("pkarypis/test", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("pkarypis/test", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Quick Links
test
This model is a fine-tuned version of tiiuae/falcon-7b on the GAIR/lima dataset. It achieves the following results on the evaluation set:
- Loss: 2.4176
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- num_devices: 16
- gradient_accumulation_steps: 2
- total_train_batch_size: 128
- total_eval_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 10.0
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.0635 | 0.91 | 5 | 1.9126 |
| 1.9282 | 2.0 | 11 | 1.8814 |
| 1.7541 | 2.91 | 16 | 2.2656 |
| 1.5669 | 4.0 | 22 | 2.2188 |
| 1.3975 | 4.91 | 27 | 2.2543 |
| 1.2431 | 6.0 | 33 | 2.3338 |
| 1.1081 | 6.91 | 38 | 2.3438 |
| 1.0212 | 8.0 | 44 | 2.4276 |
| 0.9554 | 8.91 | 49 | 2.4176 |
| 0.9463 | 9.09 | 50 | 2.4176 |
Framework versions
- Transformers 4.38.2
- Pytorch 2.1.2
- Datasets 2.14.6
- Tokenizers 0.15.2
- Downloads last month
- 11
Model tree for pkarypis/test
Base model
tiiuae/falcon-7b
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pkarypis/test", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)