Comments (3)
Hello @felbecker ,
HuggingFace automatically converts the models to tensorflow safetensors. We just updated the repositories with them, you can find one of the v2 model's tensorflow version here.
Best regards,
Hugo
from nucleotide-transformer.
Great, thanks!
from nucleotide-transformer.
Hi,
I encountered an issue while loading the tensorflow weights for the v2 model, I tried to load them in two ways:
- Using TFAutoModelForMaskedLM (safe_tensors and trust_remote_code enabeled). I got following error:
ValueError: Unrecognized configuration class <class 'transformers_modules.InstaDeepAI.nucleotide-transformer-v2-50m-multi-species.af10a726a544d702d43e1de84548c7f1bc30cc8f.esm_config.EsmConfig'> for this kind of AutoModel: TFAutoModelForMaskedLM.
- Using TFEsmForMaskedLM, I got:
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/transformers/modeling_tf_pytorch_utils.py", line 348, in load_pytorch_state_dict_in_tf2_model
array = apply_transpose(transpose, array, symbolic_weight.shape)
File "/opt/conda/lib/python3.9/site-packages/transformers/modeling_tf_pytorch_utils.py", line 143, in apply_transpose
weight = reshape(weight, match_shape)
File "/opt/conda/lib/python3.9/site-packages/transformers/utils/generic.py", line 620, in reshape
return tf.reshape(array, newshape)
File "/opt/conda/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/opt/conda/lib/python3.9/site-packages/tensorflow/python/eager/execute.py", line 54, in quick_execute
tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 2097152 values, but the requested shape has 1048576 [Op:Reshape]
Is there a different way to load the model? Thanks for your help!
Best,
Lars
from nucleotide-transformer.
Related Issues (20)
- Fix v2 api
- Update README.txt
- Prediction using fine-tined model with LoRA HOT 1
- Can I simply take 'CLS' token as my sequence representations? HOT 1
- Inquiry Regarding Details of Section A.5.4 HOT 1
- Provide more examples and real world use cases
- Bug: jax version issues on TPU Colab
- Add Agro NT model
- NT nucleotide-level splice site prediction HOT 1
- Training process for Nucleotide Transformer Model HOT 1
- Checkpoints are not downloading. HOT 1
- Fix typos in colab notebook
- Extend SegmentNT notebook
- Remove unwanted prints
- Fix mismatch in sequence position for Fig 3
- Add description to SegmentNT notebook
- Cannot download the pre-training weight HOT 2
- Enable downloading model without tqdm
- Confusion about the max_positions value HOT 1
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 nucleotide-transformer.