Upload folder using huggingface_hub
Browse files- README.md +79 -0
- config.json +46 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer_config.json +35 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model:
|
3 |
+
- vinhnx90/facebook-opt-350m-vinhnx90-love_poems
|
4 |
+
library_name: transformers
|
5 |
+
model_name: facebook-opt-350m-vinhnx90-love_poems
|
6 |
+
tags:
|
7 |
+
- bnb-my-repo
|
8 |
+
- generated_from_trainer
|
9 |
+
- trl
|
10 |
+
- sft
|
11 |
+
licence: license
|
12 |
+
---
|
13 |
+
# vinhnx90/facebook-opt-350m-vinhnx90-love_poems (Quantized)
|
14 |
+
|
15 |
+
## Description
|
16 |
+
This model is a quantized version of the original model [`vinhnx90/facebook-opt-350m-vinhnx90-love_poems`](https://huggingface.co/vinhnx90/facebook-opt-350m-vinhnx90-love_poems).
|
17 |
+
|
18 |
+
It's quantized using the BitsAndBytes library to 4-bit using the [bnb-my-repo](https://huggingface.co/spaces/bnb-community/bnb-my-repo) space.
|
19 |
+
|
20 |
+
## Quantization Details
|
21 |
+
- **Quantization Type**: int4
|
22 |
+
- **bnb_4bit_quant_type**: fp4
|
23 |
+
- **bnb_4bit_use_double_quant**: True
|
24 |
+
- **bnb_4bit_compute_dtype**: float32
|
25 |
+
- **bnb_4bit_quant_storage**: bfloat16
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
# 📄 Original Model Information
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
# Model Card for facebook-opt-350m-vinhnx90-love_poems
|
34 |
+
|
35 |
+
This model is a fine-tuned version of [facebook/opt-350m](https://huggingface.co/facebook/opt-350m).
|
36 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
37 |
+
|
38 |
+
## Quick start
|
39 |
+
|
40 |
+
```python
|
41 |
+
from transformers import pipeline
|
42 |
+
|
43 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
44 |
+
generator = pipeline("text-generation", model="vinhnx90/facebook-opt-350m-vinhnx90-love_poems", device="cuda")
|
45 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
46 |
+
print(output["generated_text"])
|
47 |
+
```
|
48 |
+
|
49 |
+
## Training procedure
|
50 |
+
|
51 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/vinhnguyen2308/huggingface/runs/ntckdff9)
|
52 |
+
|
53 |
+
|
54 |
+
This model was trained with SFT.
|
55 |
+
|
56 |
+
### Framework versions
|
57 |
+
|
58 |
+
- TRL: 0.13.0
|
59 |
+
- Transformers: 4.47.1
|
60 |
+
- Pytorch: 2.5.1+cu121
|
61 |
+
- Datasets: 3.2.0
|
62 |
+
- Tokenizers: 0.21.0
|
63 |
+
|
64 |
+
## Citations
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
Cite TRL as:
|
69 |
+
|
70 |
+
```bibtex
|
71 |
+
@misc{vonwerra2022trl,
|
72 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
73 |
+
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
|
74 |
+
year = 2020,
|
75 |
+
journal = {GitHub repository},
|
76 |
+
publisher = {GitHub},
|
77 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
78 |
+
}
|
79 |
+
```
|
config.json
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "vinhnx90/facebook-opt-350m-vinhnx90-love_poems",
|
3 |
+
"_remove_final_layer_norm": false,
|
4 |
+
"activation_dropout": 0.0,
|
5 |
+
"activation_function": "relu",
|
6 |
+
"architectures": [
|
7 |
+
"OPTModel"
|
8 |
+
],
|
9 |
+
"attention_dropout": 0.0,
|
10 |
+
"bos_token_id": 2,
|
11 |
+
"do_layer_norm_before": false,
|
12 |
+
"dropout": 0.1,
|
13 |
+
"enable_bias": true,
|
14 |
+
"eos_token_id": 2,
|
15 |
+
"ffn_dim": 4096,
|
16 |
+
"hidden_size": 1024,
|
17 |
+
"init_std": 0.02,
|
18 |
+
"layer_norm_elementwise_affine": true,
|
19 |
+
"layerdrop": 0.0,
|
20 |
+
"max_position_embeddings": 2048,
|
21 |
+
"model_type": "opt",
|
22 |
+
"num_attention_heads": 16,
|
23 |
+
"num_hidden_layers": 24,
|
24 |
+
"pad_token_id": 1,
|
25 |
+
"prefix": "</s>",
|
26 |
+
"quantization_config": {
|
27 |
+
"_load_in_4bit": true,
|
28 |
+
"_load_in_8bit": false,
|
29 |
+
"bnb_4bit_compute_dtype": "float32",
|
30 |
+
"bnb_4bit_quant_storage": "bfloat16",
|
31 |
+
"bnb_4bit_quant_type": "fp4",
|
32 |
+
"bnb_4bit_use_double_quant": true,
|
33 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
34 |
+
"llm_int8_has_fp16_weight": false,
|
35 |
+
"llm_int8_skip_modules": null,
|
36 |
+
"llm_int8_threshold": 6.0,
|
37 |
+
"load_in_4bit": true,
|
38 |
+
"load_in_8bit": false,
|
39 |
+
"quant_method": "bitsandbytes"
|
40 |
+
},
|
41 |
+
"torch_dtype": "float32",
|
42 |
+
"transformers_version": "4.49.0",
|
43 |
+
"use_cache": true,
|
44 |
+
"vocab_size": 50272,
|
45 |
+
"word_embed_proj_dim": 512
|
46 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:424e705e3fdde944bcce2e6d4efc7b0ee6f755bba925246aaccaa10f00a61270
|
3 |
+
size 269275352
|
special_tokens_map.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "</s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "<pad>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "</s>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": true,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_prefix_space": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"1": {
|
6 |
+
"content": "<pad>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": true,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"2": {
|
14 |
+
"content": "</s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": true,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
}
|
21 |
+
},
|
22 |
+
"bos_token": "</s>",
|
23 |
+
"clean_up_tokenization_spaces": false,
|
24 |
+
"eos_token": "</s>",
|
25 |
+
"errors": "replace",
|
26 |
+
"extra_special_tokens": {},
|
27 |
+
"max_length": 512,
|
28 |
+
"model_max_length": 1000000000000000019884624838656,
|
29 |
+
"pad_token": "<pad>",
|
30 |
+
"stride": 0,
|
31 |
+
"tokenizer_class": "GPT2Tokenizer",
|
32 |
+
"truncation_side": "right",
|
33 |
+
"truncation_strategy": "longest_first",
|
34 |
+
"unk_token": "</s>"
|
35 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|