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

Maximum sequence length #3

Open
ElArkk opened this issue Aug 24, 2022 · 2 comments
Open

Maximum sequence length #3

ElArkk opened this issue Aug 24, 2022 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ElArkk
Copy link

ElArkk commented Aug 24, 2022

Hi,

When using the likelihood functionality of AbLang, I'm noticing an upper limit of sequence length that it will still process (somewhere < 150 residues).
Breaking example:

heavy_ablang = ablang.pretrained("heavy", device="cpu")
heavy_ablang.freeze()
likelihoods = heavy_ablang("HASTA"*40, mode='likelihood')

On CPU I get the following error:
IndexError: index out of range in self

On GPU I get cryptic CUDA errors which bork the GPU until kernel restart.

Is there an known upper limit for sequence length?

Thanks!

@TobiasHeOl
Copy link
Owner

Hi ElArkk,

The upper limit of sequence length in AbLang is based on the positional embedding layer, which takes a max length of 160. Because of the addition of extra tokens the effective max length is 157. This length should be long enough to span the variable region of any standard antibody.

Nonetheless, I will add an error message explaining this.

I hope this helps.

Best,
Tobias

@TobiasHeOl TobiasHeOl self-assigned this Aug 24, 2022
@TobiasHeOl TobiasHeOl added the documentation Improvements or additions to documentation label Aug 24, 2022
@ElArkk
Copy link
Author

ElArkk commented Aug 24, 2022

That's perfect, thank you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants