初始化项目,由ModelHub XC社区提供模型
Model: prince-canuma/Damysus-2.7B-Chat-GGUF Source: Original Platform
This commit is contained in:
42
.gitattributes
vendored
Normal file
42
.gitattributes
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
*.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
|
||||
*.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
|
||||
truthfulQA.png filter=lfs diff=lfs merge=lfs -text
|
||||
Damysus-2.7B-Chat-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Damysus-2.7B-Chat-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Damysus-2.7B-Chat-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Damysus-2.7B-Chat.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Damysus-2.7B-Chat.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Damysus-2.7B-Chat.f16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
3
Damysus-2.7B-Chat.Q4_K_M.gguf
Normal file
3
Damysus-2.7B-Chat.Q4_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5e7f105e814ccd33aa7a6dd78f98c48b15604121837bdae3d51dda9b4b639c5
|
||||
size 1734416640
|
||||
3
Damysus-2.7B-Chat.Q8_0.gguf
Normal file
3
Damysus-2.7B-Chat.Q8_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c2f96188616dafb89d626d4782792566aea82646d14ee0923dee9b2f087e626
|
||||
size 2953104128
|
||||
3
Damysus-2.7B-Chat.f16.gguf
Normal file
3
Damysus-2.7B-Chat.f16.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:15a3aecca2b1fc703e11c09ed5d6fa585a2cb41c7a68363cc6bb30be21b67704
|
||||
size 5553825664
|
||||
BIN
Damysus.png
Normal file
BIN
Damysus.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 383 KiB |
363
README.md
Normal file
363
README.md
Normal file
@@ -0,0 +1,363 @@
|
||||
---
|
||||
language:
|
||||
- en
|
||||
license: mit
|
||||
library_name: transformers
|
||||
tags:
|
||||
- nlp
|
||||
- phi
|
||||
- phi-2
|
||||
- instruct
|
||||
base_model:
|
||||
- microsoft/phi-2
|
||||
datasets:
|
||||
- Open-Orca/SlimOrca
|
||||
- prince-canuma/TinyOrca
|
||||
|
||||
model-index:
|
||||
- name: Damysus-2.7B-Chat
|
||||
results:
|
||||
- task:
|
||||
type: text-generation
|
||||
metrics:
|
||||
- name: Average
|
||||
type: Average
|
||||
value: 60.49
|
||||
verified: true
|
||||
source:
|
||||
name: Open LLM Leaderboard
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
|
||||
|
||||
- task:
|
||||
type: text-generation
|
||||
dataset:
|
||||
name: ARC (25-shot)
|
||||
type: ai2_arc
|
||||
metrics:
|
||||
- name: Accuracy Norm
|
||||
type: acc_norm
|
||||
value: 59.81
|
||||
verified: true
|
||||
source:
|
||||
name: Open LLM Leaderboard
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
|
||||
|
||||
- task:
|
||||
type: text-generation
|
||||
dataset:
|
||||
name: Hellaswag (10-shot)
|
||||
type: Hellaswag
|
||||
metrics:
|
||||
- name: Accuracy Norm
|
||||
type: acc
|
||||
value: 74.52
|
||||
verified: true
|
||||
source:
|
||||
name: Open LLM Leaderboard
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
|
||||
|
||||
- task:
|
||||
type: text-generation
|
||||
dataset:
|
||||
name: MMLU (5-shot)
|
||||
type: MMLU
|
||||
metrics:
|
||||
- name: Accuracy
|
||||
type: acc
|
||||
value: 56.33
|
||||
verified: true
|
||||
source:
|
||||
name: Open LLM Leaderboard
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
|
||||
|
||||
- task:
|
||||
type: text-generation
|
||||
dataset:
|
||||
name: Truthful QA
|
||||
type: Truthful_QA
|
||||
metrics:
|
||||
- name: Multi-true
|
||||
type: mc2
|
||||
value: 46.74
|
||||
verified: true
|
||||
source:
|
||||
name: Open LLM Leaderboard
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
|
||||
|
||||
- task:
|
||||
type: text-generation
|
||||
dataset:
|
||||
name: Winogrande (5-shot)
|
||||
type: Winogrande
|
||||
metrics:
|
||||
- name: Accuracy
|
||||
type: acc
|
||||
value: 75.06
|
||||
verified: true
|
||||
source:
|
||||
name: Open LLM Leaderboard
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
|
||||
|
||||
- task:
|
||||
type: text-generation
|
||||
dataset:
|
||||
name: GSM8K (5-shot)
|
||||
type: GSM8K
|
||||
metrics:
|
||||
- name: Accuracy
|
||||
type: acc
|
||||
value: 50.64
|
||||
verified: true
|
||||
source:
|
||||
name: Open LLM Leaderboard
|
||||
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
|
||||
---
|
||||
|
||||
# Model Summary
|
||||
<img src="Damysus.png" width="500" alt="Damysus - the fastest giant"/>
|
||||
|
||||
<!-- Provide a quick summary of what the model is/does. -->
|
||||
This model is a GGUF version of [Damysus-2.7B-Chat](https://huggingface.co/prince-canuma/Damysus-2.7B-Chat).
|
||||
|
||||
|
||||
## Model Description
|
||||
|
||||
<!-- Provide a longer summary of what this model is. -->
|
||||
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
||||
|
||||
- **Developed by:** [Prince Canuma](https://huggingface.co/prince-canuma)
|
||||
- **Model type:** Transformer
|
||||
- **License:** MIT
|
||||
- **Finetuned from model:** microsoft/phi-2
|
||||
|
||||
|
||||
## Uses
|
||||
|
||||
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
||||
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
||||
|
||||
You can use this model to build local/cloud RAG applications.
|
||||
It can serve as the:
|
||||
- Answer synthesizer,
|
||||
- Summarizer,
|
||||
- Or query rewriter model.
|
||||
|
||||
### Limitations
|
||||
|
||||
This model inherits some of the base model's limitations, such as:
|
||||
- Generate Inaccurate Code and Facts: The model may produce incorrect code snippets and statements. Users should treat these outputs as suggestions or starting points, not as definitive or accurate solutions.
|
||||
- Limited Scope for code: Majority of Phi-2 training data is based in Python and use common packages such as "typing, math, random, collections, datetime, itertools". If the model generates Python scripts that utilize other packages or scripts in other languages, we strongly recommend users manually verify all API uses.
|
||||
- Language Limitations: The model is primarily designed to understand standard English. Informal English, slang, or any other languages might pose challenges to its comprehension, leading to potential misinterpretations or errors in response.
|
||||
|
||||
### On the command line, including multiple files at once
|
||||
|
||||
I recommend using the `huggingface-hub` Python library:
|
||||
|
||||
```shell
|
||||
pip3 install huggingface-hub
|
||||
```
|
||||
|
||||
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
||||
|
||||
```shell
|
||||
huggingface-cli download prince-canuma/Damysus-2.7B-Chat-GGUF Damysus-2.7B-Chat.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>More advanced huggingface-cli download usage (click to read)</summary>
|
||||
|
||||
You can also download multiple files at once with a pattern:
|
||||
|
||||
```shell
|
||||
huggingface-cli download prince-canuma/Damysus-2.7B-Chat-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
|
||||
```
|
||||
|
||||
For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
|
||||
|
||||
To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
|
||||
|
||||
```shell
|
||||
pip3 install hf_transfer
|
||||
```
|
||||
|
||||
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
||||
|
||||
```shell
|
||||
HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download prince-canuma/Damysus-2.7B-Chat-GGUF Damysus-2.7B-Chat.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
|
||||
```
|
||||
|
||||
Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
|
||||
</details>
|
||||
<!-- README_GGUF.md-how-to-download end -->
|
||||
|
||||
<!-- README_GGUF.md-how-to-run start -->
|
||||
## Example `llama.cpp` command
|
||||
|
||||
Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
|
||||
|
||||
```shell
|
||||
!./main -m ../Damysus-2.7B-Chat-GGUF/Damysus-2.7B-Chat.Q4_K_M.gguf \
|
||||
--color -c 2048 --temp 0 \
|
||||
--prompt "<|im_start|>system\nYou are a helpful assistant. Please keep your answers short.<|im_end|>\n<|im_start|>user\nCount to ten<|im_end|>\n" \
|
||||
-n 256 --in-suffix "<|im_start|>assistant\n" -r "User:" -e --verbose-prompt
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```shell
|
||||
!./main -m ../Damysus-2.7B-Chat-GGUF/Damysus-2.7B-Chat.Q4_K_M.gguf \
|
||||
--color -c 2048 --temp 0 \
|
||||
-p "You are a helpful assistant. Please keep your answers short." -n 256 --in-suffix "<|im_start|>assistant\n" \
|
||||
-r "User:" -e --verbose-prompt -cml
|
||||
|
||||
```
|
||||
- `-ngl N` offload N number of layers to GPU. Remove it if you don't have GPU acceleration.
|
||||
|
||||
- `-c 2048` set desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.
|
||||
|
||||
- Add `-i -ins` or `-cml` argument for interactive chat-style conversation.
|
||||
|
||||
For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) or run:
|
||||
|
||||
```shell
|
||||
!./main --help
|
||||
```
|
||||
|
||||
## Training Details
|
||||
|
||||
### Training Data
|
||||
|
||||
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
||||
I used [SlimOrca](https://huggingface.co/datasets/Open-Orca/SlimOrca) dataset, a new curated subset of our OpenOrca data.
|
||||
In the course of this study, the [SlimOrca](https://huggingface.co/datasets/Open-Orca/SlimOrca) dataset was used, representing a meticulously curated subset derived from the broader OpenOrca dataset. This release provides an efficient means of reaching performance on-par with using larger slices of the [OpenOrca](https://huggingface.co/datasets/Open-Orca/OpenOrca), while only including ~500k GPT-4 completions.
|
||||
|
||||
Subsequently, two distinct subsets were crafted, comprising 102,000 and 1,000 samples, denoted as:
|
||||
|
||||
- [prince-canuma/SmallOrca](https://huggingface.co/datasets/prince-canuma/SmallOrca)
|
||||
- [prince-canuma/TinyOrca](https://huggingface.co/datasets/prince-canuma/TinyOrca)
|
||||
|
||||
Although experimentation was conducted with both datasets, optimal results were achieved through fine-tuning on a modest set of 200 samples.
|
||||
Notably, the investigation revealed that augmenting the training data beyond this threshold predominantly enhanced the model's proficiency in generating Chain-of-Thought responses.
|
||||
However, it is imperative to note that the preference for Chain-of-Thought responses may not be universally applicable. Particularly in scenarios like the RAG setup,
|
||||
succinct answers to prompts are often favored, especially for straightforward queries.
|
||||
|
||||
### Training Procedure
|
||||
|
||||
#### Preprocessing
|
||||
|
||||
1. Convert dataset to chatML format
|
||||
2. Remove all samples with more than 2048 tokens (Phi-2 context size)
|
||||
3. Mask instructions (System and User) at training time.
|
||||
|
||||
#### LoRA Config
|
||||
- **lora_alpha:** 128,
|
||||
- **lora_dropout:** 0.05,
|
||||
- **r:** 256,
|
||||
- **bias:** "none",
|
||||
- **target_modules:** "all-linear",
|
||||
- **task_type:** "CAUSAL_LM",
|
||||
|
||||
#### Training Hyperparameters
|
||||
|
||||
- **Training regime:** bf16 mixed precision, <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
||||
- **max_steps:** 100,
|
||||
- **per_device_train_batch_size:** 2,
|
||||
- **gradient_accumulation_steps:** 2,
|
||||
- **optim:** "adamw_torch_fused",
|
||||
- **learning_rate:** 2e-4,
|
||||
- **max_grad_norm:** 0.3,
|
||||
- **warmup_ratio:** 0.03,
|
||||
- **lr_scheduler_type:** "constant",
|
||||
|
||||
#### Trainer
|
||||
- **max_seq_length:** 1744,
|
||||
- **data_collator:** DataCollatorForCompletionOnlyLM
|
||||
|
||||
## Evaluation
|
||||
|
||||
<img src="truthfulQA.png" width="800" alt="Damysus-2.7B-chat truthfulQA benchmark results"/>
|
||||
<!-- This section describes the evaluation protocols and provides the results. -->
|
||||
|
||||
We evaluate models on 7 key benchmarks using the Eleuther AI Language Model Evaluation Harness , a unified framework to test generative language models on a large number of different evaluation tasks.
|
||||
|
||||
- AI2 Reasoning Challenge (25-shot) - a set of grade-school science questions.
|
||||
- HellaSwag (10-shot) - a test of commonsense inference, which is easy for humans (~95%) but challenging for SOTA models.
|
||||
- MMLU (5-shot) - a test to measure a text model's multitask accuracy. The test covers 57 tasks including elementary mathematics, US history, computer science, law, and more.
|
||||
- TruthfulQA (0-shot) - a test to measure a model's propensity to reproduce falsehoods commonly found online. Note: TruthfulQA is technically a 6-shot task in the Harness because each example is prepended with 6 Q/A pairs, even in the 0-shot setting.
|
||||
- Winogrande (5-shot) - an adversarial and difficult Winograd benchmark at scale, for commonsense reasoning.
|
||||
- GSM8k (5-shot) - diverse grade school math word problems to measure a model's ability to solve multi-step mathematical reasoning problems.
|
||||
For all these evaluations, a higher score is a better score. We chose these benchmarks as they test a variety of reasoning and general knowledge across a wide variety of fields in 0-shot and few-shot settings.
|
||||
|
||||
Read more [here](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard).
|
||||
|
||||
### Results
|
||||
|
||||
| Model | AVG | ARC | Hellaswag | MMLU | Truthful QA | Winogrande | GSM8K |
|
||||
|-------|--------:|------:|----------:|-----:|----------:|----------:|----------:|
|
||||
| [NousResearch/Nous-Puffin-70B](NousResearch/Nous-Puffin-70B) | 64.91 | 67.41 | 87.37 | 69.77 | 46.77 | 83.9 | 34.27 |
|
||||
| [TheBloke/Llama-2-70B-fp16](https://huggingface.co/TheBloke/Llama-2-70B-fp16) | 64.52 | 67.32 | 87.33 | 69.83 | 44.92 | 83.74 | 33.97 |
|
||||
| [NousResearch/Yarn-Mistral-7B-64k](https://huggingface.co/NousResearch/Yarn-Mistral-7b-64k) | 59.63 | 59.9 | 82.51 | 62.96 | 41.86 | 77.27 | 33.28 |
|
||||
| [Qwen1.5-4B-Chat](https://huggingface.co/Qwen/Qwen1.5-4B-Chat) | 46.79 | 43.26 | 69.73 | 55.55 | 44.79 | 64.96 | 2.43 |
|
||||
| [Microsoft/phi-2](https://huggingface.co/microsoft/phi-2) | 61.33 | 61.09 | 75.11 | 58.11 | 44.47 | 74.35 | 54.81 |
|
||||
| [Damysus-2.7B-Chat](https://huggingface.co/prince-canuma/Damysus-2.7B-Chat) (Ours) | 60.49 | 59.81 | 74.52 | 56.33 | **46.74** | **75.06** | 50.64 |
|
||||
|
||||
|
||||
## Technical Specifications
|
||||
|
||||
### Compute Infrastructure
|
||||
|
||||
- Modal Labs
|
||||
|
||||
#### Hardware
|
||||
|
||||
- OS: Linux
|
||||
- GPU: A10G
|
||||
|
||||
#### Libraries
|
||||
|
||||
- TRL
|
||||
- Transformers
|
||||
- PEFT
|
||||
- Datasets
|
||||
- Accelerate
|
||||
- torch
|
||||
- Wandb
|
||||
- Bitsandbytes
|
||||
- Plotly
|
||||
|
||||
## Future work
|
||||
|
||||
I plan to explore the following tuning setups:
|
||||
- Function calling
|
||||
- DPO
|
||||
|
||||
## Citation
|
||||
|
||||
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
||||
|
||||
**BibTeX:**
|
||||
```bibtex
|
||||
@misc{Damysus-2.7B-Chat,
|
||||
title={Damysus-2.7B-Chat} ,
|
||||
author={Prince Canuma},
|
||||
year={2024},
|
||||
}
|
||||
```
|
||||
```bibtex
|
||||
@misc{SlimOrca,
|
||||
title = {SlimOrca: An Open Dataset of GPT-4 Augmented FLAN Reasoning Traces, with Verification},
|
||||
author = {Wing Lian and Guan Wang and Bleys Goodson and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
|
||||
year = {2023},
|
||||
publisher = {HuggingFace},
|
||||
url = {https://https://huggingface.co/Open-Orca/SlimOrca}
|
||||
}
|
||||
```
|
||||
```bibtex
|
||||
@misc{open-llm-leaderboard,
|
||||
author = {Edward Beeching and Clémentine Fourrier and Nathan Habib and Sheon Han and Nathan Lambert and Nazneen Rajani and Omar Sanseviero and Lewis Tunstall and Thomas Wolf},
|
||||
title = {Open LLM Leaderboard},
|
||||
year = {2023},
|
||||
publisher = {Hugging Face},
|
||||
howpublished = "\url{https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard}"
|
||||
}
|
||||
```
|
||||
42
added_tokens.json
Normal file
42
added_tokens.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"\t\t": 50294,
|
||||
"\t\t\t": 50293,
|
||||
"\t\t\t\t": 50292,
|
||||
"\t\t\t\t\t": 50291,
|
||||
"\t\t\t\t\t\t": 50290,
|
||||
"\t\t\t\t\t\t\t": 50289,
|
||||
"\t\t\t\t\t\t\t\t": 50288,
|
||||
"\t\t\t\t\t\t\t\t\t": 50287,
|
||||
" ": 50286,
|
||||
" ": 50285,
|
||||
" ": 50284,
|
||||
" ": 50283,
|
||||
" ": 50282,
|
||||
" ": 50281,
|
||||
" ": 50280,
|
||||
" ": 50279,
|
||||
" ": 50278,
|
||||
" ": 50277,
|
||||
" ": 50276,
|
||||
" ": 50275,
|
||||
" ": 50274,
|
||||
" ": 50273,
|
||||
" ": 50272,
|
||||
" ": 50271,
|
||||
" ": 50270,
|
||||
" ": 50269,
|
||||
" ": 50268,
|
||||
" ": 50267,
|
||||
" ": 50266,
|
||||
" ": 50265,
|
||||
" ": 50264,
|
||||
" ": 50263,
|
||||
" ": 50262,
|
||||
" ": 50261,
|
||||
" ": 50260,
|
||||
" ": 50259,
|
||||
" ": 50258,
|
||||
" ": 50257,
|
||||
"<|im_end|>": 50296,
|
||||
"<|im_start|>": 50295
|
||||
}
|
||||
34
config.json
Normal file
34
config.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"_name_or_path": "microsoft/phi-2",
|
||||
"architectures": [
|
||||
"PhiForCausalLM"
|
||||
],
|
||||
"attention_dropout": 0.0,
|
||||
"auto_map": {
|
||||
"AutoConfig": "microsoft/phi-2--configuration_phi.PhiConfig",
|
||||
"AutoModelForCausalLM": "microsoft/phi-2--modeling_phi.PhiForCausalLM"
|
||||
},
|
||||
"bos_token_id": 50256,
|
||||
"embd_pdrop": 0.0,
|
||||
"eos_token_id": 50256,
|
||||
"hidden_act": "gelu_new",
|
||||
"hidden_size": 2560,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 10240,
|
||||
"layer_norm_eps": 1e-05,
|
||||
"max_position_embeddings": 2048,
|
||||
"model_type": "phi",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 32,
|
||||
"num_key_value_heads": 32,
|
||||
"partial_rotary_factor": 0.4,
|
||||
"qk_layernorm": false,
|
||||
"resid_pdrop": 0.1,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 10000.0,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "float32",
|
||||
"transformers_version": "4.38.0.dev0",
|
||||
"use_cache": true,
|
||||
"vocab_size": 50297
|
||||
}
|
||||
6
generation_config.json
Normal file
6
generation_config.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 50256,
|
||||
"eos_token_id": 50256,
|
||||
"transformers_version": "4.38.0.dev0"
|
||||
}
|
||||
50001
merges.txt
Normal file
50001
merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
28
special_tokens_map.json
Normal file
28
special_tokens_map.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
{
|
||||
"content": "<|im_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
{
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
],
|
||||
"bos_token": "<|im_start|>",
|
||||
"eos_token": "<|im_end|>",
|
||||
"pad_token": "<|im_end|>",
|
||||
"unk_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
100665
tokenizer.json
Normal file
100665
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
345
tokenizer_config.json
Normal file
345
tokenizer_config.json
Normal file
@@ -0,0 +1,345 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"added_tokens_decoder": {
|
||||
"50256": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"50257": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50258": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50259": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50260": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50261": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50262": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50263": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50264": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50265": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50266": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50267": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50268": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50269": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50270": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50271": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50272": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50273": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50274": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50275": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50276": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50277": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50278": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50279": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50280": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50281": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50282": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50283": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50284": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50285": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50286": {
|
||||
"content": " ",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50287": {
|
||||
"content": "\t\t\t\t\t\t\t\t\t",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50288": {
|
||||
"content": "\t\t\t\t\t\t\t\t",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50289": {
|
||||
"content": "\t\t\t\t\t\t\t",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50290": {
|
||||
"content": "\t\t\t\t\t\t",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50291": {
|
||||
"content": "\t\t\t\t\t",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50292": {
|
||||
"content": "\t\t\t\t",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50293": {
|
||||
"content": "\t\t\t",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50294": {
|
||||
"content": "\t\t",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
},
|
||||
"50295": {
|
||||
"content": "<|im_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"50296": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"additional_special_tokens": [
|
||||
"<|im_start|>",
|
||||
"<|im_end|>"
|
||||
],
|
||||
"bos_token": "<|im_start|>",
|
||||
"chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
||||
"clean_up_tokenization_spaces": true,
|
||||
"eos_token": "<|im_end|>",
|
||||
"model_max_length": 2048,
|
||||
"pad_token": "<|im_end|>",
|
||||
"tokenizer_class": "CodeGenTokenizer",
|
||||
"unk_token": "<|endoftext|>"
|
||||
}
|
||||
3
truthfulQA.png
Normal file
3
truthfulQA.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b75074d858600a50e5bd61a10dd9e0ff356d5bbd4a999e0d3dc63f348af5ce22
|
||||
size 2905826
|
||||
1
vocab.json
Normal file
1
vocab.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user