-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAFT Enhancements: Improved robustness, logging, checkpointing, threading, Llama support, Azure auth and eval #604
Merged
ShishirPatil
merged 81 commits into
ShishirPatil:main
from
cedricvidal:upstream-merge-prep
Aug 27, 2024
Merged
RAFT Enhancements: Improved robustness, logging, checkpointing, threading, Llama support, Azure auth and eval #604
ShishirPatil
merged 81 commits into
ShishirPatil:main
from
cedricvidal:upstream-merge-prep
Aug 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cedricvidal
changed the title
Comprehensive RAFT Enhancements: Improved robustness, logging, progress, checkpointing, multi-threading, Llama support, Azure authentication and evaluation refinements
RAFT Enhancements: Improved robustness, logging, progress, checkpointing, multi-threading, Llama support, Azure auth and eval
Aug 25, 2024
cedricvidal
changed the title
RAFT Enhancements: Improved robustness, logging, progress, checkpointing, multi-threading, Llama support, Azure auth and eval
RAFT Enhancements: Improved robustness, logging, checkpointing, threading, Llama support, Azure auth and eval
Aug 25, 2024
With 30 chunks, if the process fails at chunk 29 (0-indexed), then checkpoint saves 30//15*15 = 15 instead of 30 Moreover, no need to save checkpoint state for every chunk, it's only need when the ds is actually saved and makes the code easier to understand.
because different systems have different expectations.
To clarify that this is the ground truth gold answer as opposed to the answer generated by the fine tuned model
- makes collecting checkpoints less expensive - makes deleting checkpoints a single line call
cedricvidal
force-pushed
the
upstream-merge-prep
branch
2 times, most recently
from
August 25, 2024 19:37
5a09a0a
to
44aa242
Compare
- Threads can stop early when asked through shared Event - `--qa-threshold` param to configure when to stop
cedricvidal
force-pushed
the
upstream-merge-prep
branch
from
August 25, 2024 19:41
44aa242
to
f1b84f6
Compare
ShishirPatil
approved these changes
Aug 27, 2024
ShishirPatil
added a commit
that referenced
this pull request
Aug 27, 2024
nkcheng255
pushed a commit
to nkcheng255/gorilla
that referenced
this pull request
Aug 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive set of updates and improvements to the RAFT project, enhancing robustness, logging, progress monitoring, checkpointing, multi-threading, Llama support, Azure authentication, and evaluation processes.
Note: Those updates where developed for the most part to prepare the MS Build 2024 talk Practicalities of Fine-Tuning Llama 2 with AI Studio with @ShishirPatil and Bala Venkataraman.
Key updates include:
RAFT Script Improvements:
This PR introduces significant updates to the
raft.py
script, expanding its functionality, improving its configurability, and removing deprecated options. Below is a summary of the key changes:raft.py
, including the introduction of multi-threading, better directory handling, and optimization of chunk processing. The--fast
mode, which deactivated checkpointing, was removed in favor of a more efficient implementation that allows checkpointing to remain activated at all times.--workers
parameter to enable parallel processing, improving efficiency and reliability during various operations.tqdm
, including enhanced stats support inclient_utils.py
, providing better insights into the process flow.New Features and Options
Output Format Expansion:
eval
. This format is intended for evaluation purposes, providing an additional way to format datasets.Enhanced Output Configuration:
--output-completion-prompt-column
and--output-completion-completion-column
options to allow users to specify custom column names for prompts and completions when using thecompletion
format.System Prompt Customization:
--system-prompt-key
option to allow users to select between different system prompt keys (gpt
orllama
) based on the model they intend to use for dataset generation.Worker Thread Management:
--workers
option to allow parallel processing by specifying the number of worker threads, improving the script’s efficiency in handling large datasets.Checkpoint Management:
--auto-clean-checkpoints
option, giving users the ability to automatically clean up checkpoints after dataset generation, reducing the need for manual intervention.Question/Answer Sample Threshold:
--qa-threshold
option, which allows users to specify a threshold for the number of Question/Answer samples to generate before stopping. This provides more control over the dataset generation process, particularly in large-scale operations.Removed Options
--fast
:--fast
option has been removed. This option was previously used to run the script in a fast mode with no recovery implemented. The script has been optimized to improve performance without the need for a separate fast mode, rendering this option obsolete.Default Value Updates
--output-type
,--output-format
,--doctype
,--embedding_model
,--completion_model
,--workers
, and more. These defaults aim to make the script more user-friendly by reducing the need for extensive configuration.Evaluation Script Improvements:
tqdm
, allowing for real-time tracking of the evaluation process.--workers
option, allowing for fine-tuned parallel processing during evaluations.Here's the PR message formatted in Markdown:
Enhanced CLI Options for
eval.py
This PR introduces several new command-line options to the
eval.py
script, providing enhanced functionality and flexibility for model evaluation. The following changes have been made:--model MODEL
: Added support for specifying the model to be evaluated.--mode MODE
: Introduced a new option to select the API mode, either 'chat' or 'completion'. The default mode is set to 'chat'.--input-prompt-key INPUT_PROMPT_KEY
: Added the ability to define which column in the dataset should be used as the input prompt.--output-answer-key OUTPUT_ANSWER_KEY
: Added the ability to define which column in the dataset should be used as the output answer.--workers WORKERS
: Introduced multi-threading support, allowing users to specify the number of worker threads for evaluating the dataset, improving processing efficiency.--env-prefix ENV_PREFIX
: Added an option to customize the prefix for environment variables used for API keys and base URLs. The default prefix is set toEVAL
.These enhancements provide greater control over the evaluation process, allowing for more customized and efficient use of the
eval.py
script.Testing