Instructions to use SangBinCho/long_context_32k_testing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SangBinCho/long_context_32k_testing with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/mnt/local_storage/.cache/huggingface/hub/models--meta-llama--Llama-2-13b-chat-hf/snapshots/ee41e514ee23be967cc6a698dba34c5fd08ab9b5") model = PeftModel.from_pretrained(base_model, "SangBinCho/long_context_32k_testing") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +9 -0
- adapter_config.json +1 -0
- adapter_model.safetensors +3 -0
- added_tokens.json +5 -0
- config.json +30 -0
- special_tokens_map.json +6 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +39 -0
README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
---
|
| 4 |
+
## Training procedure
|
| 5 |
+
|
| 6 |
+
### Framework versions
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
- PEFT 0.6.0.dev0
|
adapter_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"auto_mapping": null, "base_model_name_or_path": "/mnt/local_storage/.cache/huggingface/hub/models--meta-llama--Llama-2-13b-chat-hf/snapshots/ee41e514ee23be967cc6a698dba34c5fd08ab9b5", "bias": "none", "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layers_pattern": null, "layers_to_transform": null, "lora_alpha": 16, "lora_dropout": 0.05, "modules_to_save": [], "peft_type": "LORA", "r": 8, "revision": null, "target_modules": ["q_proj", "v_proj", "k_proj", "o_proj", "gate_proj", "up_proj", "down_proj", "embed_tokens", "lm_head"], "task_type": "CAUSAL_LM", "context_length": 32768}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29eb7e16ca14f0279c27a04710abe239c9500e7af25cfcd9e99030b690e96b30
|
| 3 |
+
size 63849760
|
added_tokens.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</s>": 2,
|
| 3 |
+
"<s>": 1,
|
| 4 |
+
"<unk>": 0
|
| 5 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/mnt/local_storage/.cache/huggingface/hub/models--meta-llama--Llama-2-13b-chat-hf/snapshots/ee41e514ee23be967cc6a698dba34c5fd08ab9b5",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 5120,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 13824,
|
| 13 |
+
"max_position_embeddings": 4096,
|
| 14 |
+
"model_type": "llama",
|
| 15 |
+
"num_attention_heads": 40,
|
| 16 |
+
"num_hidden_layers": 40,
|
| 17 |
+
"num_key_value_heads": 40,
|
| 18 |
+
"pretraining_tp": 1,
|
| 19 |
+
"rms_norm_eps": 1e-05,
|
| 20 |
+
"rope_scaling": {
|
| 21 |
+
"factor": 8.0,
|
| 22 |
+
"type": "linear"
|
| 23 |
+
},
|
| 24 |
+
"rope_theta": 10000.0,
|
| 25 |
+
"tie_word_embeddings": false,
|
| 26 |
+
"torch_dtype": "bfloat16",
|
| 27 |
+
"transformers_version": "4.35.0.dev0",
|
| 28 |
+
"use_cache": false,
|
| 29 |
+
"vocab_size": 32000
|
| 30 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"eos_token": "</s>",
|
| 4 |
+
"pad_token": "</s>",
|
| 5 |
+
"unk_token": "<unk>"
|
| 6 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<unk>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "<s>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "</s>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
}
|
| 27 |
+
},
|
| 28 |
+
"additional_special_tokens": [],
|
| 29 |
+
"bos_token": "<s>",
|
| 30 |
+
"clean_up_tokenization_spaces": false,
|
| 31 |
+
"eos_token": "</s>",
|
| 32 |
+
"legacy": true,
|
| 33 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 34 |
+
"pad_token": "</s>",
|
| 35 |
+
"sp_model_kwargs": {},
|
| 36 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 37 |
+
"unk_token": "<unk>",
|
| 38 |
+
"use_default_system_prompt": true
|
| 39 |
+
}
|