Comments (5)
Hello, are you able to run the example script here? I've double check it and can run it successfully.
I guess the reason for the above error you faced is due to that you load the model from a local folder instead of from the remote HuggingFace hub. To load the local model checkpoint, you'll have to download the class and config files. Below is the example code to load the local model:
from modeling_codet5p_embedding import CodeT5pEmbeddingModel
model = CodeT5pEmbeddingModel.from_pretrained(checkpoint)
from codet5.
Hello. After checking the error, I investigate that the reason is due to the codet5p_embedding hasn't been a key defined in this file:
https://github.com/huggingface/transformers/blob/main/src/transformers/models/auto/configuration_auto.py
I check in the latest version on Github they didn't define that key. Is that key specific to your machine (or did you update the configuration_auto.py file specifically compared to the general version)?
from codet5.
Thank you for your help. Yes, at first I ran the script on my local ubuntu 22.04 server (which the code called to the remoted HuggingFace hub "Salesforce/codet5p-110m-embedding") but it returned the same error. Thus, I changed to download the model to my local machine to call but the error still remained.
Let me try again.
from codet5.
I tried to load it remotely from huggingface remote side. It shows the error like this:
`
OSError: Can't load 'Salesforce/codet5p-110m-embedding'. Make sure that:
-
'Salesforce/codet5p-110m-embedding' is a correct model identifier listed on 'https://huggingface.co/models'
-
or 'Salesforce/codet5p-110m-embedding' is the correct path to a directory containing a 'config.json' file`
from codet5.
I checked the version of my transformer. I used the old version of transformers as 4.11.3, while the current version is 4.32.1. reinstall my transformer and it worked. Thanks for your help.
from codet5.
Related Issues (20)
- 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'
- Mukendi
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.