Comments (9)
Thank you! Much appreciated!
That's an interesting use case. It would be closer to a generative use case it sounds like, which we haven't supported yet, but plan to explore this in future work.
Hacking the current code for generative tasks shouldn't be super difficult though, and we certainly welcome any contributions!
from hyena-dna.
yes the weights for the lm_head
are there, but the provided loading ckpt code is implemented such that it replaces the lm_head
with a new head (scratch) for a downstream task.
If you literally will use the same pretraining model, ie no change to the architecture, then it's even easier, you just pass in the model ckpts using the flag train.pretrained_model_path=path_to_ckpt
. This will resume training from the ckpt - you would need to modify code to do inference on some dataset yourself.
Note: this doesn't just give you a DNA generator out of the box. Remember, you're only predicting a single next token given a sequence. If you want to generate a whole new sequence, then you'd have to do this in a loop and prepend 1 token at a time as you decode, which will be relatively slow. There's a whole field dedicated to fast inference and decoding/generating (but we don't support on this repo).
Going to take some hacking :)
You would need to just modify that code.
from hyena-dna.
Hi Eric, thank you for the update!
I've been playing since yesterday, after I saw announcements about implementation in HF.
I have a simple Colab notebook to evaluate the (averaged) log-likelihood of a sequence. Does it look correct?
BTW, is it possible there's a small bug when computing the loss? I wonder if it should use self.vocab_size
.
from hyena-dna.
Just to follow on this topic, does the weights on HF also contain the lm_head
weights ? And if not could you easily share those weights ? :)
from hyena-dna.
Alright it's perfect, thanks for clearing that up :)
from hyena-dna.
A way to get logits:
https://github.com/HazyResearch/hyena-dna#getting-logits-from-pretrained-model
To clarify though, it's not generating new sequences necessarily from this, it's generating 1 new token at the very end, so you'd to do a for loop to actually generate.
from hyena-dna.
Hi @gonzalobenegas, you're totally right about the bug - my fault, I wrote that part of the port! It should be fixed now.
from hyena-dna.
@gonzalobenegas looks good to me!
from hyena-dna.
Great, thank you!
from hyena-dna.
Related Issues (20)
- How to recreate the result of DNABERT in paper HOT 1
- How to convert the batch cell from the GenomicBenchmarks data to user data? CUDA memory overload if running "Single example" cell multiple times to produce embeddings.
- How to pre-train on custom dataset using hyena-dna
- need to swap layer norm op for triton-based layer norm? HOT 2
- Reproducing the HyenaDNA results on NT Benchmarks
- Running with standard Huggingface config and trainer files does not give optimal results
- The default for pretrained_model_path in config files is a personal directory
- Bugs when I try to access the embeddings HOT 3
- Question: How to generate DNA sequence or sequence embeddings based on own bed file
- How can I access the dataset--genomic_benchmark I got timeout issue
- Failure to reproduce the hyenaDNA reported results on NT tasks. HURRY! HURRY HURRY
- Symbol lookup error
- Error when Resuming pre-training
- Training loss becomes NAN during pretraining HOT 1
- Questions about pre-training with multiple sequences HOT 1
- Inquire about GWAS tasks
- install problem
- CUDA out of memory occurs when the training length reaches 450k on a100 HOT 1
- Where are genomic_bench_dataloader.py and nucleotide_transformer_dataloader.py located?
- RuntimeError: cuFFT error: CUFFT_INTERNAL_ERROR
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 hyena-dna.