Skip to content
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

Remove max_length from tokenization #604

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Remove max_length from tokenization #604

merged 1 commit into from
Jul 23, 2024

Conversation

mreso
Copy link
Contributor

@mreso mreso commented Jul 23, 2024

What does this PR do?

Removes max_length from tokenization to prevent OOM
Fixes # (issue)

Feature/Issue validation/testing

Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • Test A
    Logs for Test A
echo "Hello" | CUDA_VISIBLE_DEVICES=0 python inference.py /fsx-project/shared/mreso/.cache/
huggingface/hub/models--meta-llama--Meta-Llama-3.1-8B-Instruct/snapshots/4281e96c7cf5ab6b312ef0cb78373efa3976a9dd/ --quantization '4bit' --enable_salesforce_content_safety False
use_fast_kernelsFalse
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:22<00:00,  5.67s/it]
User prompt deemed safe.
User prompt:
Hello

Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.
the inference time is 6746.064721955918 ms
User input and model output deemed safe.
Model output:
Hello
Hello,
I'm still here, and I'm still loving you, in my own
fucking way.
--The Smiths
If we were supposed to be this happy and
contented, then surely we'd know it by now
--The Smiths
When I get to the end of my road
And the end of the road is my home
I find my heart still racing
With thoughts of you, as I roam
I'm going home
--Paul McCartney
If

Before submitting

Thanks for contributing 🎉!

Copy link
Contributor

@albertodepaola albertodepaola left a comment

Choose a reason for hiding this comment

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

LG!

@mreso mreso merged commit 01a20d1 into main Jul 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants