townwish commited on
Commit
8e7d70e
·
verified ·
1 Parent(s): b530bd7

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +31 -0
  2. adapter_config.json +32 -0
  3. adapter_model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags: []
4
+ ---
5
+
6
+ # Just for PEFT testing
7
+
8
+ See PR #1658
9
+
10
+ ## Reproduction
11
+
12
+ ```python
13
+ import torch
14
+ from huggingface_hub import cached_download
15
+ from transformers import AutoModelForCausalLM
16
+ from peft import LoraConfig, PeftModel, get_peft_model
17
+
18
+ torch.manual_seed(0)
19
+ model = AutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-BertModel").eval()
20
+ lora_config = LoraConfig(init_lora_weights=False)
21
+ peft_model = get_peft_model(model, lora_config)
22
+ peft_model.push_to_hub("peft-internal-testing/tiny-random-BertModel-lora")
23
+
24
+ del model, peft_model
25
+ torch.manual_seed(0)
26
+ model = AutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-BertModel").eval()
27
+ torch.manual_seed(1)
28
+ lora_config = LoraConfig(init_lora_weights=False)
29
+ peft_model = get_peft_model(model, lora_config)
30
+ peft_model.push_to_hub("peft-internal-testing/tiny-random-BertModel-lora", revision="v1.2.3")
31
+ ```
adapter_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": {
4
+ "base_model_class": "BertLMHeadModel",
5
+ "parent_library": "mindone.transformers.models.bert.modeling_bert"
6
+ },
7
+ "base_model_name_or_path": "townwish/tiny-random-BertModel",
8
+ "bias": "none",
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": false,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 8,
17
+ "lora_dropout": 0.0,
18
+ "megatron_config": null,
19
+ "megatron_core": "megatron.core",
20
+ "modules_to_save": null,
21
+ "peft_type": "LORA",
22
+ "r": 8,
23
+ "rank_pattern": {},
24
+ "revision": null,
25
+ "target_modules": [
26
+ "value",
27
+ "query"
28
+ ],
29
+ "task_type": null,
30
+ "use_dora": false,
31
+ "use_rslora": false
32
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2218394edc1c87ce342d456a824eb0381bf85fbece3ef0accad7b1cbc74e6a82
3
+ size 23200