Upload folder using huggingface_hub
Browse files- README.md +48 -0
- adapter_config.json +36 -0
- adapter_model.safetensors +3 -0
- config.json +31 -0
- merges.txt +0 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer_config.json +32 -0
- training_args.bin +3 -0
- training_params.json +49 -0
- vocab.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- autotrain
|
| 4 |
+
- text-generation-inference
|
| 5 |
+
- text-generation
|
| 6 |
+
- peft
|
| 7 |
+
library_name: transformers
|
| 8 |
+
base_model: facebook/opt-1.3b
|
| 9 |
+
widget:
|
| 10 |
+
- messages:
|
| 11 |
+
- role: user
|
| 12 |
+
content: What is your favorite condiment?
|
| 13 |
+
license: other
|
| 14 |
+
datasets:
|
| 15 |
+
- HARSHIIIII/AI-TASK-MODIFIED
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Model Trained Using AutoTrain
|
| 19 |
+
|
| 20 |
+
This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
|
| 21 |
+
|
| 22 |
+
# Usage
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
|
| 26 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 27 |
+
|
| 28 |
+
model_path = "PATH_TO_THIS_REPO"
|
| 29 |
+
|
| 30 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 31 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 32 |
+
model_path,
|
| 33 |
+
device_map="auto",
|
| 34 |
+
torch_dtype='auto'
|
| 35 |
+
).eval()
|
| 36 |
+
|
| 37 |
+
# Prompt content: "hi"
|
| 38 |
+
messages = [
|
| 39 |
+
{"role": "user", "content": "hi"}
|
| 40 |
+
]
|
| 41 |
+
|
| 42 |
+
input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
|
| 43 |
+
output_ids = model.generate(input_ids.to('cuda'))
|
| 44 |
+
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
|
| 45 |
+
|
| 46 |
+
# Model response: "Hello! How can I assist you today?"
|
| 47 |
+
print(response)
|
| 48 |
+
```
|
adapter_config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "facebook/opt-1.3b",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.1,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": null,
|
| 21 |
+
"peft_type": "LORA",
|
| 22 |
+
"r": 4,
|
| 23 |
+
"rank_pattern": {},
|
| 24 |
+
"revision": null,
|
| 25 |
+
"target_modules": [
|
| 26 |
+
"k_proj",
|
| 27 |
+
"fc1",
|
| 28 |
+
"v_proj",
|
| 29 |
+
"q_proj",
|
| 30 |
+
"out_proj",
|
| 31 |
+
"fc2"
|
| 32 |
+
],
|
| 33 |
+
"task_type": "CAUSAL_LM",
|
| 34 |
+
"use_dora": false,
|
| 35 |
+
"use_rslora": false
|
| 36 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5261b2e54b72107ae3dadb1777a399079490c30279485122275f839e8318b394
|
| 3 |
+
size 425966112
|
config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "facebook/opt-1.3b",
|
| 3 |
+
"_remove_final_layer_norm": false,
|
| 4 |
+
"activation_dropout": 0.0,
|
| 5 |
+
"activation_function": "relu",
|
| 6 |
+
"architectures": [
|
| 7 |
+
"OPTForCausalLM"
|
| 8 |
+
],
|
| 9 |
+
"attention_dropout": 0.0,
|
| 10 |
+
"bos_token_id": 2,
|
| 11 |
+
"do_layer_norm_before": true,
|
| 12 |
+
"dropout": 0.1,
|
| 13 |
+
"enable_bias": true,
|
| 14 |
+
"eos_token_id": 2,
|
| 15 |
+
"ffn_dim": 8192,
|
| 16 |
+
"hidden_size": 2048,
|
| 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": 32,
|
| 23 |
+
"num_hidden_layers": 24,
|
| 24 |
+
"pad_token_id": 1,
|
| 25 |
+
"prefix": "</s>",
|
| 26 |
+
"torch_dtype": "float16",
|
| 27 |
+
"transformers_version": "4.48.0",
|
| 28 |
+
"use_cache": true,
|
| 29 |
+
"vocab_size": 50272,
|
| 30 |
+
"word_embed_proj_dim": 2048
|
| 31 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
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,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 24 |
+
"clean_up_tokenization_spaces": false,
|
| 25 |
+
"eos_token": "</s>",
|
| 26 |
+
"errors": "replace",
|
| 27 |
+
"extra_special_tokens": {},
|
| 28 |
+
"model_max_length": 2048,
|
| 29 |
+
"pad_token": "<pad>",
|
| 30 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 31 |
+
"unk_token": "</s>"
|
| 32 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ff0e50f9b822a054073f110e6774a38ef72561687cc8cb2c22efafdcbf47586
|
| 3 |
+
size 5560
|
training_params.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "facebook/opt-1.3b",
|
| 3 |
+
"project_name": "AI-Task-Allocator0",
|
| 4 |
+
"data_path": "HARSHIIIII/AI-TASK-MODIFIED",
|
| 5 |
+
"train_split": "train",
|
| 6 |
+
"valid_split": null,
|
| 7 |
+
"add_eos_token": true,
|
| 8 |
+
"block_size": 1024,
|
| 9 |
+
"model_max_length": 2048,
|
| 10 |
+
"padding": "right",
|
| 11 |
+
"trainer": "sft",
|
| 12 |
+
"use_flash_attention_2": false,
|
| 13 |
+
"log": "none",
|
| 14 |
+
"disable_gradient_checkpointing": false,
|
| 15 |
+
"logging_steps": -1,
|
| 16 |
+
"eval_strategy": "epoch",
|
| 17 |
+
"save_total_limit": 1,
|
| 18 |
+
"auto_find_batch_size": false,
|
| 19 |
+
"mixed_precision": "bf16",
|
| 20 |
+
"lr": 3e-05,
|
| 21 |
+
"epochs": 3,
|
| 22 |
+
"batch_size": 1,
|
| 23 |
+
"warmup_ratio": 0.1,
|
| 24 |
+
"gradient_accumulation": 32,
|
| 25 |
+
"optimizer": "adamw_torch",
|
| 26 |
+
"scheduler": "linear",
|
| 27 |
+
"weight_decay": 0.0,
|
| 28 |
+
"max_grad_norm": 1.0,
|
| 29 |
+
"seed": 42,
|
| 30 |
+
"chat_template": null,
|
| 31 |
+
"quantization": "int4",
|
| 32 |
+
"target_modules": "all-linear",
|
| 33 |
+
"merge_adapter": false,
|
| 34 |
+
"peft": true,
|
| 35 |
+
"lora_r": 4,
|
| 36 |
+
"lora_alpha": 16,
|
| 37 |
+
"lora_dropout": 0.1,
|
| 38 |
+
"model_ref": null,
|
| 39 |
+
"dpo_beta": 0.1,
|
| 40 |
+
"max_prompt_length": 128,
|
| 41 |
+
"max_completion_length": null,
|
| 42 |
+
"prompt_text_column": null,
|
| 43 |
+
"text_column": "InputText",
|
| 44 |
+
"rejected_text_column": null,
|
| 45 |
+
"push_to_hub": true,
|
| 46 |
+
"username": "HARSHIIIII",
|
| 47 |
+
"unsloth": false,
|
| 48 |
+
"distributed_backend": null
|
| 49 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|