初始化项目,由ModelHub XC社区提供模型

Model: vicgalle/gpt2-alpaca-gpt4
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-20 16:07:11 +08:00
commit 36c3bf4cd3
27 changed files with 320194 additions and 0 deletions

34
.gitattributes vendored Normal file
View File

@@ -0,0 +1,34 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text

106
README.md Normal file
View File

@@ -0,0 +1,106 @@
---
license: mit
datasets:
- vicgalle/alpaca-gpt4
language:
- en
tags:
- instruction-tuning
- alpaca
- gpt4
---
# GPT-2 finetuned with Alpaca-GPT4
### Examples
The following samples were generated with `{"temperature" : 0.7, "top_p" : 0.92, "top_k" : 0}`:
##### **Give three tips for a good meal**
```
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Give three tips for a good meal.
### Response:
1. **Serve fresh, locally grown produce:** Fresh produce is a great way to eat healthy and to enjoy a healthy meal. Try to choose a variety of fruits, vegetables, and whole grains, and experiment with the variety to find the perfect balance. Make sure to bring plenty of fresh fruits, vegetables, and whole grains throughout the meal.
2. **Strive for a quick and easy meal:** The key is to make a meal that is quick and easy to prepare. Take a break from the food, grab some snacks, and enjoy a delicious meal. Make sure to cook the ingredients beforehand, and avoid overcooking or filling the food up.
3. **Determine the time and place:** If you're eating a lot of food, it can be tempting to make a time and place for it. This will help you stay organized and get your ingredients in the right order. Make sure to set up a timer and avoid rushing to the grocery store. If possible, make sure to follow the recipe for your specific dish and avoid leaving the refrigerator unattended for too long.
```
##### **Write a poem about a delicious night**
```
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a poem about a delicious night.
### Response:
As the sky above me fluttered with the gentle breeze,
The moon was in its soft, gentle embrace,
The night was full of cheer and joy,
A perfect night's night.
The sun shone bright, the stars twinkled,
The colors were pure and true,
As if in the presence of a master.
But the night was not without its troubles.
A stormy night, it rained heavily,
A dark and stormy night, it raged with fire.
But one thing was certain, it was in the air,
The scent of the sweet scent of a sweet sweet night.
The night was filled with joy, with a sense of peace and satisfaction.
The stars twinkled, the moon was in its soft, gentle embrace,
The night was full of cheer and joy,
A perfect night's night.
The night was full of laughter, with the gentle breeze,
The colors were pure and true,
As if in the presence of a master.
But the night was full of worries, with the fierce tempest.
But the night was filled with hope, with a sense of hope that could not be ignored.
```
##### **Write a tweet describing your capabilities**
```
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a tweet describing your capabilities.
### Response:
"Empowering your creativity, skills, and abilities through my technology-driven approach. My team of professionals will help you achieve your goals, stay ahead of the curve, and contribute to your success. #Diversity"
```
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_vicgalle__gpt2-alpaca-gpt4)
| Metric | Value |
|-----------------------|---------------------------|
| Avg. | 24.98 |
| ARC (25-shot) | 22.61 |
| HellaSwag (10-shot) | 31.17 |
| MMLU (5-shot) | 25.76 |
| TruthfulQA (0-shot) | 38.04 |
| Winogrande (5-shot) | 52.17 |
| GSM8K (5-shot) | 0.3 |
| DROP (3-shot) | 4.83 |

5
added_tokens.json Normal file
View File

@@ -0,0 +1,5 @@
{
"### End": 50257,
"### Instruction:": 50258,
"### Response:\n": 50259
}

39
config.json Normal file
View File

@@ -0,0 +1,39 @@
{
"_name_or_path": "gpt2",
"activation_function": "gelu_new",
"architectures": [
"GPT2LMHeadModel"
],
"attn_pdrop": 0.1,
"bos_token_id": 50256,
"embd_pdrop": 0.1,
"eos_token_id": 50256,
"initializer_range": 0.02,
"layer_norm_epsilon": 1e-05,
"model_type": "gpt2",
"n_ctx": 1024,
"n_embd": 768,
"n_head": 12,
"n_inner": null,
"n_layer": 12,
"n_positions": 1024,
"reorder_and_upcast_attn": false,
"resid_pdrop": 0.1,
"scale_attn_by_inverse_layer_idx": false,
"scale_attn_weights": true,
"summary_activation": null,
"summary_first_dropout": 0.1,
"summary_proj_to_labels": true,
"summary_type": "cls_index",
"summary_use_proj": true,
"task_specific_params": {
"text-generation": {
"do_sample": true,
"max_length": 50
}
},
"torch_dtype": "float32",
"transformers_version": "4.25.1",
"use_cache": false,
"vocab_size": 50260
}

50001
merges.txt Normal file

File diff suppressed because it is too large Load Diff

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c10817b828c8112056d4c66923fdffa1e8426336a6fa4be6571f785e3d8f912
size 510368814

5
onnx/added_tokens.json Normal file
View File

@@ -0,0 +1,5 @@
{
"### End": 50257,
"### Instruction:": 50258,
"### Response:\n": 50259
}

38
onnx/config.json Normal file
View File

@@ -0,0 +1,38 @@
{
"_name_or_path": "vicgalle/gpt2-alpaca-gpt4",
"activation_function": "gelu_new",
"architectures": [
"GPT2LMHeadModel"
],
"attn_pdrop": 0.1,
"bos_token_id": 50256,
"embd_pdrop": 0.1,
"eos_token_id": 50256,
"initializer_range": 0.02,
"layer_norm_epsilon": 1e-05,
"model_type": "gpt2",
"n_ctx": 1024,
"n_embd": 768,
"n_head": 12,
"n_inner": null,
"n_layer": 12,
"n_positions": 1024,
"reorder_and_upcast_attn": false,
"resid_pdrop": 0.1,
"scale_attn_by_inverse_layer_idx": false,
"scale_attn_weights": true,
"summary_activation": null,
"summary_first_dropout": 0.1,
"summary_proj_to_labels": true,
"summary_type": "cls_index",
"summary_use_proj": true,
"task_specific_params": {
"text-generation": {
"do_sample": true,
"max_length": 50
}
},
"transformers_version": "4.30.2",
"use_cache": false,
"vocab_size": 50260
}

3
onnx/decoder_model.onnx Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce3d67a50e5c947fd0bb54f7e3a34686b2d72b616cfdbfb509ac16bd741814e1
size 653684274

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba3a2b791e15d3cbc6e7eba60e06bcb3bf3172a381c593bb5351e9cb9ec66dc4
size 655207771

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d6b4928fdd33809114aa703f391aadd760d897cae453ba50f7ded6990713abd
size 653691081

View File

@@ -0,0 +1,7 @@
{
"_from_model_config": true,
"bos_token_id": 50256,
"eos_token_id": 50256,
"transformers_version": "4.30.2",
"use_cache": false
}

50001
onnx/merges.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
{
"additional_special_tokens": [
"### End",
"### Instruction:",
"### Response:\n"
],
"bos_token": "<|endoftext|>",
"eos_token": "<|endoftext|>",
"pad_token": "<|endoftext|>",
"unk_token": "<|endoftext|>"
}

100332
onnx/tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
{
"add_prefix_space": false,
"bos_token": "<|endoftext|>",
"clean_up_tokenization_spaces": true,
"eos_token": "<|endoftext|>",
"model_max_length": 1024,
"tokenizer_class": "GPT2Tokenizer",
"unk_token": "<|endoftext|>"
}

1
onnx/vocab.json Normal file

File diff suppressed because one or more lines are too long

3
optimizer.pt Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f45526bd952b433dd4fdae23ad85d4064a30a14fb364957719ba5b51185b0c26
size 995623621

3
pytorch_model.bin Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b2345ae33f2d49e13a82609cbf7040f84ac114200623ecb5556d861977737312
size 510407229

3
rng_state.pth Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d9a07bcf34366fa689317c09c065ed62f79125e9fc9bfb1c580ffb413a34be00
size 14575

3
scheduler.pt Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d419935c328008b32794e5c6eaaddb8b7bc6a476469b22dbba070e8e71be725
size 627

11
special_tokens_map.json Normal file
View File

@@ -0,0 +1,11 @@
{
"additional_special_tokens": [
"### End",
"### Instruction:",
"### Response:\n"
],
"bos_token": "<|endoftext|>",
"eos_token": "<|endoftext|>",
"pad_token": "<|endoftext|>",
"unk_token": "<|endoftext|>"
}

100332
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

10
tokenizer_config.json Normal file
View File

@@ -0,0 +1,10 @@
{
"add_prefix_space": false,
"bos_token": "<|endoftext|>",
"eos_token": "<|endoftext|>",
"model_max_length": 1024,
"name_or_path": "gpt2",
"special_tokens_map_file": null,
"tokenizer_class": "GPT2Tokenizer",
"unk_token": "<|endoftext|>"
}

19224
trainer_state.json Normal file

File diff suppressed because it is too large Load Diff

3
training_args.bin Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb0932fec1c2d58c9d6e32e3f37907249d6ee0f993237e8792ddccd6175e8688
size 3387

1
vocab.json Normal file

File diff suppressed because one or more lines are too long