Skip to content

add enable jax profiler to run_server #140

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

Merged
merged 2 commits into from
Jul 1, 2024
Merged

Conversation

bvrockwell
Copy link
Collaborator

@bvrockwell bvrockwell commented Jul 1, 2024

  • passes profiler arguments to server launch as optional
  • uses instructions provided here for how to port forward from remote to local browser

example:

python run_server.py 
--size=8b 
--batch_size=1 
--max_cache_length=128 
--quantize_weights=false  
--quantize_kv_cache=true 
--checkpoint_path=".../models" 
--tokenizer_path=".../models/tokenizer.model" 
--model_name=llama-3
--sharding_config="default_shardings/llama.yaml"
--temperature=0.5
--sampling_algorithm="weighted"
--enable_jax_profiler=True # defaults to port 9999

Test when enabled on v5e-1:

python deps/JetStream/jetstream/tools/requester.py \
--tokenizer ".../models/tokenizer.model" 
Proxy backend support is not added
Sending request to: 0.0.0.0:9000
Prompt: Today is a good day
Response:  to be
Screenshot 2024-07-01 at 10 46 45 AM

Test when disabled (defaults):

python deps/JetStream/jetstream/tools/requester.py \
--tokenizer ".../models/tokenizer.model" 
Proxy backend support is not added
Sending request to: 0.0.0.0:9000
Prompt: Today is a good day
Response:  to be

@bvrockwell bvrockwell marked this pull request as ready for review July 1, 2024 18:08
@bvrockwell bvrockwell requested review from qihqi and FanhaiLu1 July 1, 2024 18:10
Copy link
Collaborator

@FanhaiLu1 FanhaiLu1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding it!

@bvrockwell bvrockwell merged commit ec4b158 into main Jul 1, 2024
4 checks passed
@bvrockwell bvrockwell deleted the add-server-profiler branch July 1, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants