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

high-level generation workflows (e.g. a LM class) on T5 (and Flan T5) is missing. #1413

Open
debrupf2946 opened this issue Jan 25, 2024 · 4 comments
Assignees
Labels
type:feature New feature or request

Comments

@debrupf2946
Copy link

debrupf2946 commented Jan 25, 2024

In Keras NLP t5 model the architecture and weights are present, but HL workflows are missing

I would like to contribute a high-level masked language modeling workflow in the t5 model

This Idea is suggested by @fchollet in the Keras-user group

@debrupf2946
Copy link
Author

debrupf2946 commented Jan 25, 2024

Dear maintainers,
Please assign me this issue I am working on it.

@mattdangerw mattdangerw added the type:feature New feature or request label Jan 29, 2024
@mattdangerw
Copy link
Member

Thanks @debrupf2946 you are assigned!

@debrupf2946
Copy link
Author

debrupf2946 commented Feb 10, 2024

@mattdangerw can you please help me with setting up the project
**Environment:**Linux
I installed from contributing.MD (CPU only)

Got following message in Terminal

Successfully built keras-nlp-0.7.0.tar.gz and keras_nlp-0.7.0-py3-none-any.whl
Build successful. Wheel file available at /home/debrup/keras-nlp/dist/keras_nlp-0.7.0-py3-none-any.whl
Installing wheel file.
Processing ./dist/keras_nlp-0.7.0-py3-none-any.whl
Installing collected packages: keras-nlp
Successfully installed keras-nlp-0.7.0

But in VS-Code when I am running a particular file I get this error

(keras-nlp-cpu) (base) debrup@debrup-2946:~/keras-nlp$ python keras_nlp/models/t5/t5_tokenizer.py
2024-02-11 08:57:56.931437: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
  File "/home/debrup/keras-nlp/keras_nlp/models/t5/t5_tokenizer.py", line 16, in <module>
    from keras_nlp.api_export import keras_nlp_export
ModuleNotFoundError: No module named 'keras_nlp.api_export'

Can you please help me out,its my first contribution and I really want to make it

@debrupf2946
Copy link
Author

@mattdangerw @fchollet
I have made t5_preprocessor file which adds padding to the sentence packs(input id and padding) I have also tested works fine.
I am working on the t5_MaskedLMMask Generator I am having a problem here what should be the mask token Id
There is no mask-token-id in the t5 tokenizer file.
can you help me with some ideas how to handle the mask token in t5

Should I create a pull request for t5_preprocessor for review ,I am completed with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants