Skip to content

Commit 71ba589

Browse files
committed
PAPO evaluation module
0 parents  commit 71ba589

File tree

222 files changed

+80838
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+80838
-0
lines changed

.dockerignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.vscode
2+
.git
3+
.github
4+
.venv
5+
cache
6+
data
7+
docker
8+
saves
9+
hf_cache
10+
ms_cache
11+
om_cache
12+
output
13+
.dockerignore
14+
.gitattributes
15+
.gitignore

.env.local

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Note: actually we do not support .env, just for reference
2+
# api
3+
API_HOST=
4+
API_PORT=
5+
API_KEY=
6+
API_MODEL_NAME=
7+
API_VERBOSE=
8+
FASTAPI_ROOT_PATH=
9+
MAX_CONCURRENT=
10+
# general
11+
DISABLE_VERSION_CHECK=
12+
FORCE_CHECK_IMPORTS=
13+
ALLOW_EXTRA_ARGS=
14+
LLAMAFACTORY_VERBOSITY=
15+
USE_MODELSCOPE_HUB=
16+
USE_OPENMIND_HUB=
17+
USE_RAY=
18+
RECORD_VRAM=
19+
# torchrun
20+
FORCE_TORCHRUN=
21+
MASTER_ADDR=
22+
MASTER_PORT=
23+
NNODES=
24+
NODE_RANK=
25+
NPROC_PER_NODE=
26+
# wandb
27+
WANDB_DISABLED=
28+
WANDB_PROJECT=
29+
WANDB_API_KEY=
30+
# gradio ui
31+
GRADIO_SHARE=
32+
GRADIO_SERVER_NAME=
33+
GRADIO_SERVER_PORT=
34+
GRADIO_ROOT_PATH=
35+
GRADIO_IPV6=
36+
# setup
37+
ENABLE_SHORT_CONSOLE=
38+
# reserved (do not use)
39+
LLAMABOARD_ENABLED=
40+
LLAMABOARD_WORKDIR=

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
`hoshihiyouga AT gmail DOT com`.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

.github/CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Contributing to LLaMA Factory
2+
3+
Everyone is welcome to contribute, and we value everybody's contribution. Code contributions are not the only way to help the community. Answering questions, helping others, and improving the documentation are also immensely valuable.
4+
5+
It also helps us if you spread the word! Reference the library in blog posts about the awesome projects it made possible, shout out on Twitter every time it has helped you, or simply ⭐️ the repository to say thank you.
6+
7+
However you choose to contribute, please be mindful and respect our [code of conduct](CODE_OF_CONDUCT.md).
8+
9+
**This guide was heavily inspired by [transformers guide to contributing](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md).**
10+
11+
## Ways to contribute
12+
13+
There are several ways you can contribute to LLaMA Factory:
14+
15+
* Fix outstanding issues with the existing code.
16+
* Submit issues related to bugs or desired new features.
17+
* Contribute to the examples or to the documentation.
18+
19+
### Style guide
20+
21+
LLaMA Factory follows the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html), check it for details.
22+
23+
### Create a Pull Request
24+
25+
1. Fork the [repository](https://github.com/hiyouga/LLaMA-Factory) by clicking on the [Fork](https://github.com/hiyouga/LLaMA-Factory/fork) button on the repository's page. This creates a copy of the code under your GitHub user account.
26+
27+
2. Clone your fork to your local disk, and add the base repository as a remote:
28+
29+
```bash
30+
git clone git@github.com:[username]/LLaMA-Factory.git
31+
cd LLaMA-Factory
32+
git remote add upstream https://github.com/hiyouga/LLaMA-Factory.git
33+
```
34+
35+
3. Create a new branch to hold your development changes:
36+
37+
```bash
38+
git checkout -b dev_your_branch
39+
```
40+
41+
4. Set up a development environment by running the following command in a virtual environment:
42+
43+
```bash
44+
pip install -e ".[dev]"
45+
```
46+
47+
If LLaMA Factory was already installed in the virtual environment, remove it with `pip uninstall llamafactory` before reinstalling it in editable mode with the -e flag.
48+
49+
5. Check code before commit:
50+
51+
```bash
52+
make commit
53+
make style && make quality
54+
make test
55+
```
56+
57+
6. Submit changes:
58+
59+
```bash
60+
git add .
61+
git commit -m "commit message"
62+
git fetch upstream
63+
git rebase upstream/main
64+
git push -u origin dev_your_branch
65+
```
66+
67+
7. Create a merge request from your branch `dev_your_branch` at [origin repo](https://github.com/hiyouga/LLaMA-Factory).
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "\U0001F41B Bug / help"
2+
description: Create a report to help us improve the LLaMA Factory
3+
labels: ["bug", "pending"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Issues included in **[FAQs](https://github.com/hiyouga/LLaMA-Factory/issues/4614)** or those with **insufficient** information may be closed without a response.
9+
已经包含在 **[常见问题](https://github.com/hiyouga/LLaMA-Factory/issues/4614)** 内或提供信息**不完整**的 issues 可能不会被回复。
10+
11+
- type: markdown
12+
attributes:
13+
value: |
14+
Please do not create issues that are not related to framework bugs under this category, use **[Discussions](https://github.com/hiyouga/LLaMA-Factory/discussions/categories/q-a)** instead.
15+
请勿在此分类下创建和框架 bug 无关的 issues,训练问题求助请使用 **[讨论区](https://github.com/hiyouga/LLaMA-Factory/discussions/categories/q-a)**。
16+
17+
- type: checkboxes
18+
id: reminder
19+
attributes:
20+
label: Reminder
21+
description: |
22+
Please ensure you have read the above rules carefully and searched the existing issues (including FAQs).
23+
请确保您已经认真阅读了上述规则并且搜索过现有的 issues(包括常见问题)。
24+
25+
options:
26+
- label: I have read the above rules and searched the existing issues.
27+
required: true
28+
29+
- type: textarea
30+
id: system-info
31+
validations:
32+
required: true
33+
attributes:
34+
label: System Info
35+
description: |
36+
Please share your system info with us. You can run the command **llamafactory-cli env** and copy-paste its output below.
37+
请提供您的系统信息。您可以在命令行运行 **llamafactory-cli env** 并将其输出复制到该文本框中。
38+
39+
placeholder: llamafactory version, platform, python version, ...
40+
41+
- type: textarea
42+
id: reproduction
43+
validations:
44+
required: true
45+
attributes:
46+
label: Reproduction
47+
description: |
48+
Please provide entry arguments, error messages and stack traces that reproduces the problem.
49+
请提供入口参数,错误日志以及异常堆栈以便于我们复现问题。
50+
51+
value: |
52+
```text
53+
Put your message here.
54+
```
55+
56+
- type: textarea
57+
id: others
58+
validations:
59+
required: false
60+
attributes:
61+
label: Others
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "\U0001F680 Feature request"
2+
description: Submit a request for a new feature
3+
labels: ["enhancement", "pending"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Please do not create issues that are not related to new features under this category.
9+
请勿在此分类下创建和新特性无关的 issues。
10+
11+
- type: checkboxes
12+
id: reminder
13+
attributes:
14+
label: Reminder
15+
description: |
16+
Please ensure you have read the above rules carefully and searched the existing issues.
17+
请确保您已经认真阅读了上述规则并且搜索过现有的 issues。
18+
19+
options:
20+
- label: I have read the above rules and searched the existing issues.
21+
required: true
22+
23+
- type: textarea
24+
id: description
25+
validations:
26+
required: true
27+
attributes:
28+
label: Description
29+
description: |
30+
A clear and concise description of the feature proposal.
31+
请详细描述您希望加入的新功能特性。
32+
33+
- type: textarea
34+
id: contribution
35+
validations:
36+
required: false
37+
attributes:
38+
label: Pull Request
39+
description: |
40+
Have you already created the relevant PR and submitted the code?
41+
您是否已经创建了相关 PR 并提交了代码?

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# What does this PR do?
2+
3+
Fixes # (issue)
4+
5+
## Before submitting
6+
7+
- [ ] Did you read the [contributor guideline](https://github.com/hiyouga/LLaMA-Factory/blob/main/.github/CONTRIBUTING.md)?
8+
- [ ] Did you write any new necessary tests?

.github/SECURITY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reporting Security Issues
2+
3+
To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/hiyouga/LLaMA-Factory/security/advisories/new) tab.
4+
5+
We will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
6+
7+
Report security bugs in third-party modules to the person or team maintaining the module.

0 commit comments

Comments
 (0)