-
Notifications
You must be signed in to change notification settings - Fork 496
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
[Docs] Offline batch inference guide (static assignment) #4144
base: master
Are you sure you want to change the base?
Conversation
…to batch-inference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick look. P0 is discuss + clarify the concepts.
|
||
.. code-block:: | ||
|
||
metadata.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to show the first few lines of metadata file.
|
||
.. code-block:: bash | ||
|
||
NUM_PARALLEL_GROUPS=16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"groups" is surprising/unfamiliar; do you mean "workers"?
.. _offline-batch-inference: | ||
|
||
Large-Scale Offline Batch Inference | ||
=================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall may need a figure to illustrate all concepts and how they relate: chunks / work items (is one item = one jsonl in this case?) / groups / workers, ..
At least a bullet list at the top to explain these. I'm currently confused by the above.
|
||
llm = LLM(model='meta-llama/Meta-Llama-3.1-7B-Instruct', tensor_parallel_size=1) | ||
|
||
def batch_inference(llm: LLM, data_path: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename? It seems to be working on 1 work item / 1 batch only, and there's no 'batching'?
Scale Out to Multiple Nodes | ||
--------------------------- | ||
|
||
To scale out the inference to multiple machines, we can group the data chunks into multiple pieces so that each machine can process one piece. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reduce concept: yet another one here 'piece'!
An initial guide for the offline batch inference with static assignment.
Future TODOs:
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
conda deactivate; bash -i tests/backward_compatibility_tests.sh