-
Notifications
You must be signed in to change notification settings - Fork 916
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
Add coca trained (#307) #308
Commits on Dec 20, 2022
-
* initial setup * add coca loss * remove loss from the model * fix loss * add underscores * name changes * add cross attention to Residual and CustomResidual * fix if * ädd transformer 'decoder' * minor fix * looks better * initlize coca model structure * clean * typo and format * checkpoint signature * adjust multimodal decoder and add CoCaTransformer * keep older logic * remove chunk * typo * fix * make chunk dim explicit * adjust cfg names * add attentionalpooling * add attentional pooling to coca * small change * add cocatransformer variants and AttentionPooling * remoive older attention pooler * adapt embed text to coca text transformer * rm coca layers * rename and remove useless CoCa models * make attentionpooler pooler only * refactor for one transformer only * coca forward works * separatae context and n_queries * add inital coca_base config * remove config * small loss change * init training file * make variable order right * remove print * uniform names * renaming * add coca funcs to init * add coca config and exclude from testing * add and comment simple test (no trained model) * add L2 norm * make L2 same as in clip * remove unused temperature * type * clean * fix config * make rename and move cfg * rename * temptative add coca to factory * fix config * update config * embed contrastive cls token in model * remove unused arg * import create_loss * make factory accept coca * make caption loss distributed * make loss customizable * pass loss trhough training_epoch * add coca specific params to params * removed decoder unused parameters * remove unused attributes * adjust coca_config * fix config and remove unused parameters * remove comment * remove more comments * rename attention pooler * rename TransformerDecoder * make AttentionalPooler clearer * add local loss logic to cocaloss * only create loss if train in data * remove wrong file * fix attentional pooler call * not ready for testing * really not ready for testing * eof lien * uniform names * add possible generative loss to evaluate * change _build function names * remove wrong import * remove local_loss from captioning loss * indexing error * finish renaming * adjust configs * add training test for coca * simplify captioning loss * remove hf * fix evaluate and loss * remove print * move projection * add coca vit 32 config * test on new config * adjust coca_base config * remove coca from test_inference * maybe fix regression test * make logits and labels contiguous * simpler logic * make contiguous after transpose * last test * try fix loss * CoCa PR: loss fix + rename file * wait for feedback on this * cleanup * CoCa PR: add set_grad_checkpointing + fix checkpoint API * CoCa PR: fix eval (which uses encode_x instead of forward) * move making space for CLS token into encode_text * rever zs changes + fix Co-authored-by: gpucce <g.puccetti92@gmail.com> Co-authored-by: gpucce <g.puccetti@gmail.com> Co-authored-by: iejmac <iejmac@ip-172-31-44-155.ec2.internal>
Configuration menu - View commit details
-
Copy full SHA for 1b86601 - Browse repository at this point
Copy the full SHA 1b86601View commit details
Commits on Dec 21, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 29fa332 - Browse repository at this point
Copy the full SHA 29fa332View commit details -
Configuration menu - View commit details
-
Copy full SHA for 911c737 - Browse repository at this point
Copy the full SHA 911c737View commit details -
Co-authored-by: Romain Beaumont <romain.rom1@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b4881bc - Browse repository at this point
Copy the full SHA b4881bcView commit details -
* buil_cls_mask * add cls_mask to encode_text * add model properties Co-authored-by: Romain Beaumont <romain.rom1@gmail.com> Co-authored-by: gpucce <g.puccetti@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 50bc599 - Browse repository at this point
Copy the full SHA 50bc599View commit details
Commits on Dec 22, 2022
-
Ignore pad tokens in captioning loss (#316)
* add ignore_index * just need to pick right index Co-authored-by: gpucce <g.puccetti@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 279e088 - Browse repository at this point
Copy the full SHA 279e088View commit details -
add
generate
to coca model (#314)* add initial generative support * make generation context_length independend * remove kwargs * last positional embeddings for CLS * typo * fix mask len * add comment * remove unused args * simpler logic for input shorter than context length Co-authored-by: gpucce <g.puccetti@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for dee1ea5 - Browse repository at this point
Copy the full SHA dee1ea5View commit details
Commits on Jan 6, 2023
-
use
TextEncoder
in cocaencode_image
(#321)* use self.text in encode image * unused var * rever aAtention and CustoResidualAttentionBlock * remove whiteline * add dict output * bintegrate self.text attributes * HF compatibility * better config and minor fixes * clean * remove eembed_cls option from HF * use cls_token_position * fix cls masking * resize labels * text -> self.text * split loss logging * add total loss * minor logs formatting * fix generate * simpler logic * disentangle proj for HF too * adjust config * only norm cls * move attn_pool to VisionTransformer * adjust coca_base config * fix grad checkpointing in MultimodalTransformer Co-authored-by: gpucce <g.puccetti@gmail.com> Co-authored-by: iejMac <kilianmaciej6@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 30a73d4 - Browse repository at this point
Copy the full SHA 30a73d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f616050 - Browse repository at this point
Copy the full SHA f616050View commit details
Commits on Jan 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 061482b - Browse repository at this point
Copy the full SHA 061482bView commit details
Commits on Jan 21, 2023
-
* make jit compilable * redundant annotation * less tests * less annotations * even less annotations * fix name check in ci * some annotations back * make it simpler * make hf simpler too * better jit support with tests * remove extra line * add customtextclip * more jit tests * missing assert * add eval * typo * rever forward changes * clean coca model * more cleaning * last cleaning
Configuration menu - View commit details
-
Copy full SHA for d0bd09e - Browse repository at this point
Copy the full SHA d0bd09eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ef80b7b - Browse repository at this point
Copy the full SHA ef80b7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ab47b7 - Browse repository at this point
Copy the full SHA 2ab47b7View commit details
Commits on Jan 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c0e5950 - Browse repository at this point
Copy the full SHA c0e5950View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ab881e - Browse repository at this point
Copy the full SHA 9ab881eView commit details -
remove output_dict argument (#368)
* remove output_dict argument * cleaner
Configuration menu - View commit details
-
Copy full SHA for 3f5b0fb - Browse repository at this point
Copy the full SHA 3f5b0fbView commit details -
do same thing for _encode_image (#366)
* do same thing for _encode_image * encoder * try this * adjust inference tests * fix syntax * True not None * dumb
Configuration menu - View commit details
-
Copy full SHA for de343fb - Browse repository at this point
Copy the full SHA de343fbView commit details
Commits on Jan 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 88aa6ce - Browse repository at this point
Copy the full SHA 88aa6ceView commit details
Commits on Jan 24, 2023
-
Revert "do same thing for _encode_image (#366)"
This reverts commit de343fb.
Configuration menu - View commit details
-
Copy full SHA for 3b66f37 - Browse repository at this point
Copy the full SHA 3b66f37View commit details -
Configuration menu - View commit details
-
Copy full SHA for cdb91dd - Browse repository at this point
Copy the full SHA cdb91ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58eb5bd - Browse repository at this point
Copy the full SHA 58eb5bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for cbd66ed - Browse repository at this point
Copy the full SHA cbd66edView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf6ef3e - Browse repository at this point
Copy the full SHA bf6ef3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 03dfeab - Browse repository at this point
Copy the full SHA 03dfeabView commit details
Commits on Jan 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 15d6223 - Browse repository at this point
Copy the full SHA 15d6223View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9beb0d4 - Browse repository at this point
Copy the full SHA 9beb0d4View commit details
Commits on Jan 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fde2aee - Browse repository at this point
Copy the full SHA fde2aeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 24e454d - Browse repository at this point
Copy the full SHA 24e454dView commit details
Commits on Jan 28, 2023
-
Remove dead LN code, refactor attn_pool conditional for more clarity,…
… minor formatting tweaks
Configuration menu - View commit details
-
Copy full SHA for f7c566b - Browse repository at this point
Copy the full SHA f7c566bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9533575 - Browse repository at this point
Copy the full SHA 9533575View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5e0c5a - Browse repository at this point
Copy the full SHA f5e0c5aView commit details -
A bit more cleanup, keep context_length as context len, 'num_pos' to …
…incl extra tokens. None type check for embed_cls instead of getattr
Configuration menu - View commit details
-
Copy full SHA for 1ba2ab6 - Browse repository at this point
Copy the full SHA 1ba2ab6View commit details
Commits on Jan 29, 2023
-
CoCa: add B/32 pretrained (#389)
* add B/32 pretrained * fix * no capital * slash
Configuration menu - View commit details
-
Copy full SHA for f0847fa - Browse repository at this point
Copy the full SHA f0847faView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba081d3 - Browse repository at this point
Copy the full SHA ba081d3View commit details