Comments (5)
This is happening because all <extra_id_*>
tokens have lstrip
set to True
.
Any reason for this decision?
from codet5.
This is happening because all
<extra_id_*>
tokens havelstrip
set toTrue
. Any reason for this decision?
Indeed, this makes things work:
tokenizer.add_special_tokens({"additional_special_tokens": [AddedToken(at.content, rstrip=False, lstrip=False, single_word=False, normalized=True) for at in tokenizer.special_tokens_map_extended['additional_special_tokens']]}, replace_additional_special_tokens=True)
from codet5.
Hi both, thanks for identifying the issue and providing the solution! We did not intentionally to have lstrip
set to True
.
from codet5.
I just found out that \n and \t have the exact same token id 😐
tokenizer.convert_tokens_to_ids(["\n", "\t"])
Out[35]: [3, 3]
Edit: yes, they are both the UNK id
tokenizer.unk_token_id
Out[39]: 3
from codet5.
It seems that the problem is with \n and \t before the special tokens:
aux
Out[58]: '\t\n# this is a code comment\n\t<extra_id_0>'
tokenizer.decode(tokenizer(aux)["input_ids"], skip_special_tokens=False)
Out[59]: '<s>\t\n# this is a code comment<extra_id_0></s>'
aux
Out[62]: '\n# this is a code comment\n<extra_id_0>'
tokenizer.decode(tokenizer(aux)["input_ids"], skip_special_tokens=False)
Out[63]: '<s>\n# this is a code comment<extra_id_0></s>'
from codet5.
Related Issues (20)
- Results of retrieval-augmented code generation
- How to make the natural language query input for text to code (concode) dataset using code environment and statement?
- CodeT5 - Bug detection
- نوشتت کد برای بدست آوردن رمز وای فای نامحدود HOT 2
- 'T5Stack' object has no attribute 'first_device HOT 1
- Failed to train CodeT5p-2b on multi-gpus card
- 70x slower generation time with codet5p_2b compared to codet5p_770m
- How to train models with contrastive losses, masks, etc. HOT 1
- Minor HOT 1
- CodeT5+ for Code Clone Detection
- Finetuning concode task using finetuned checkpoints HOT 1
- How to initialize encoder with CodeGen-mono 350M?
- If codet5p can generate code for the masked part <extra_id_0>
- How can I finetune CodeT5 model for autocompletion of different programming language, and also what will the data format for this task ??
- Create an expense tracker using HTML, CSS, and JavaScript. Implement features for adding, editing, and deleting expenses. Integrate local storage to save user data
- need to finetune embedding model?
- using qlora: error:"CodeT5pEncoderDecoderModel does not support gradient checkpointing"
- How do I operate separately on the encoder and decoder ?
- TypeError: object of type 'NoneType' has no len()
- AttributeError: 'T5Config' object has no attribute 'n_layer'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codet5.