Comments (3)
I also have this question! Have not been able to get this working.
from ankh.
I realize the authors have indeed provided this in their example, but that the notebook's output printing is written to always append at the end. Standard generation works with the following snippet:
masked_seq='QVQLVESGGGLV<extra_id_0>QPGGSL'
encoded = tokenizer.encode_plus(masked_seq, add_special_tokens=True, return_tensors='pt')
input_ids = encoded['input_ids'].to(device)
generation = model.generate(input_ids=input_ids, temperature = temperature,
max_length = maximum_length,
num_beams = num_beams,
do_sample=True if temperature > 0 else False)
output_ids = generation[0].squeeze()
generated_tokens = list(tokenizer.decode(output_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False))
I will close this issue. Thanks!
from ankh.
I noticed this too, outputs in the order that you masked them. Best of luck with everything!
from ankh.
Related Issues (19)
- is feature extraction correct due to padding? HOT 1
- Decode From Protein Representation HOT 4
- High-N generation HOT 3
- Database of generated embeddings HOT 2
- Availability of fine-tuned models for downstream tasks
- Secondary structure prediction dataset HOT 2
- Half-precision
- How to compute the perplexity of a protein sequence by ankh PLM? HOT 1
- Availability of training/fine-tuning scripts HOT 1
- Generating sequences longer than 115
- python script for solubility score? HOT 1
- Missing model architecture and training details
- MultiLabelClassification Issue HOT 2
- Binary solubility example notebook error.
- Decoding labels in masking
- Downstream task: what model for remote homology prediction ?
- Fine-tuning multilabel classification
- Error: Missing Model Files for ElnaggarLab/ankh2-large on HF
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 ankh.