Upload model
Browse files- README.md +58 -0
- final_checkpoint/config.json +51 -0
- final_checkpoint/generation_config.json +6 -0
- final_checkpoint/model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: bigcode/starcoder2-7b
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: starcoder2-7b_AR2SQL
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- trl
|
| 8 |
+
- sft
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for starcoder2-7b_AR2SQL
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [bigcode/starcoder2-7b](https://huggingface.co/bigcode/starcoder2-7b).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="salma-alashry/starcoder2-7b_AR2SQL", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.18.1
|
| 38 |
+
- Transformers: 4.51.3
|
| 39 |
+
- Pytorch: 2.6.0+cu124
|
| 40 |
+
- Datasets: 3.6.0
|
| 41 |
+
- Tokenizers: 0.21.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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{\'e}dec},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
final_checkpoint/config.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_function": "gelu",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Starcoder2ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_dropout": 0.1,
|
| 7 |
+
"attention_softmax_in_fp32": true,
|
| 8 |
+
"bos_token_id": 0,
|
| 9 |
+
"embedding_dropout": 0.1,
|
| 10 |
+
"eos_token_id": 0,
|
| 11 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 12 |
+
"hidden_size": 4608,
|
| 13 |
+
"initializer_range": 0.018042,
|
| 14 |
+
"intermediate_size": 18432,
|
| 15 |
+
"layer_norm_epsilon": 1e-05,
|
| 16 |
+
"max_position_embeddings": 16384,
|
| 17 |
+
"mlp_type": "default",
|
| 18 |
+
"model_type": "starcoder2",
|
| 19 |
+
"norm_epsilon": 1e-05,
|
| 20 |
+
"norm_type": "layer_norm",
|
| 21 |
+
"num_attention_heads": 36,
|
| 22 |
+
"num_hidden_layers": 32,
|
| 23 |
+
"num_key_value_heads": 4,
|
| 24 |
+
"pretraining_tp": 1,
|
| 25 |
+
"quantization_config": {
|
| 26 |
+
"_load_in_4bit": true,
|
| 27 |
+
"_load_in_8bit": false,
|
| 28 |
+
"bnb_4bit_compute_dtype": "float16",
|
| 29 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 30 |
+
"bnb_4bit_quant_type": "nf4",
|
| 31 |
+
"bnb_4bit_use_double_quant": false,
|
| 32 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 33 |
+
"llm_int8_has_fp16_weight": false,
|
| 34 |
+
"llm_int8_skip_modules": null,
|
| 35 |
+
"llm_int8_threshold": 6.0,
|
| 36 |
+
"load_in_4bit": true,
|
| 37 |
+
"load_in_8bit": false,
|
| 38 |
+
"quant_method": "bitsandbytes"
|
| 39 |
+
},
|
| 40 |
+
"residual_dropout": 0.1,
|
| 41 |
+
"rope_scaling": null,
|
| 42 |
+
"rope_theta": 1000000,
|
| 43 |
+
"scale_attention_softmax_in_fp32": true,
|
| 44 |
+
"scale_attn_weights": true,
|
| 45 |
+
"sliding_window": 4096,
|
| 46 |
+
"torch_dtype": "float32",
|
| 47 |
+
"transformers_version": "4.51.3",
|
| 48 |
+
"use_bias": true,
|
| 49 |
+
"use_cache": false,
|
| 50 |
+
"vocab_size": 49152
|
| 51 |
+
}
|
final_checkpoint/generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 0,
|
| 5 |
+
"transformers_version": "4.51.3"
|
| 6 |
+
}
|
final_checkpoint/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3b83efbc044943f6aabd246731c14a657f6e43678688dbe66f941b89fbe670c
|
| 3 |
+
size 4937236848
|