Model save
Browse files- README.md +57 -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,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: bigcode/starcoder2-7b
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: staradapters-cpp
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- trl
|
| 8 |
+
- sft
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for staradapters-cpp
|
| 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="ahmedashrafay/staradapters-cpp", 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 |
+
[<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/aaa2419-columbia/huggingface/runs/9w9ane21)
|
| 31 |
+
|
| 32 |
+
This model was trained with SFT.
|
| 33 |
+
|
| 34 |
+
### Framework versions
|
| 35 |
+
|
| 36 |
+
- TRL: 0.12.1
|
| 37 |
+
- Transformers: 4.47.0.dev0
|
| 38 |
+
- Pytorch: 2.4.1
|
| 39 |
+
- Datasets: 3.1.0
|
| 40 |
+
- Tokenizers: 0.20.3
|
| 41 |
+
|
| 42 |
+
## Citations
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
Cite TRL as:
|
| 47 |
+
|
| 48 |
+
```bibtex
|
| 49 |
+
@misc{vonwerra2022trl,
|
| 50 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 51 |
+
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},
|
| 52 |
+
year = 2020,
|
| 53 |
+
journal = {GitHub repository},
|
| 54 |
+
publisher = {GitHub},
|
| 55 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 56 |
+
}
|
| 57 |
+
```
|
final_checkpoint/config.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "bigcode/starcoder2-7b",
|
| 3 |
+
"activation_function": "gelu",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"Starcoder2ForCausalLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_dropout": 0.1,
|
| 8 |
+
"attention_softmax_in_fp32": true,
|
| 9 |
+
"bos_token_id": 0,
|
| 10 |
+
"embedding_dropout": 0.1,
|
| 11 |
+
"eos_token_id": 0,
|
| 12 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 13 |
+
"hidden_size": 4608,
|
| 14 |
+
"initializer_range": 0.018042,
|
| 15 |
+
"intermediate_size": 18432,
|
| 16 |
+
"layer_norm_epsilon": 1e-05,
|
| 17 |
+
"max_position_embeddings": 16384,
|
| 18 |
+
"mlp_type": "default",
|
| 19 |
+
"model_type": "starcoder2",
|
| 20 |
+
"norm_epsilon": 1e-05,
|
| 21 |
+
"norm_type": "layer_norm",
|
| 22 |
+
"num_attention_heads": 36,
|
| 23 |
+
"num_hidden_layers": 32,
|
| 24 |
+
"num_key_value_heads": 4,
|
| 25 |
+
"quantization_config": {
|
| 26 |
+
"_load_in_4bit": true,
|
| 27 |
+
"_load_in_8bit": false,
|
| 28 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 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": "bfloat16",
|
| 47 |
+
"transformers_version": "4.47.0.dev0",
|
| 48 |
+
"use_bias": true,
|
| 49 |
+
"use_cache": true,
|
| 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.47.0.dev0"
|
| 6 |
+
}
|
final_checkpoint/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae65d5a3c2752f17803a97e8dd3150fe571a19aac0beb284fedaa0f67edcb992
|
| 3 |
+
size 4395894528
|