jeongukjae / huggingface-to-tfhub Goto Github PK
View Code? Open in Web Editor NEWConverting Huggingface Models to TFHub
Converting Huggingface Models to TFHub
for toy project.
https://github.com/microsoft/unilm/tree/master/minilm
-> to use in personal project (multilingual L6xH384 + "Load what you need")
Hey there! First off I'd like to thank you on all the work you've done to convert these HF models into TF Hub models, we've found your work really useful within my organization.
We were trying to use the DistilBERT uncased model, and wanted to set a different seq_length
for bert_pack_inputs
. We noticed on the official tensorflow site, it's conventional to support an optional seq_length
for the preprocessor's bert_pack_inputs
implementation. Indeed in your underlying implementation, there is the option, but it's not exposed in the call
function, which only allows the default length of 128.
For now, we have copied our own version of DistilBertPackInputs, but it would be nice to just use the TF Hub preprocessor as-is.
I was wondering if there was a reason you avoided including it - I'd be happy to open a PR to add it, but I don't have a good means of testing to make sure that the change is backwards compatible with anything else you may be using it for.
If seq_length
argument is passed, token_type_ids
that DistilBert does not require is returned.
Reproduce: https://colab.research.google.com/drive/1RSpk-A5s2Ogna6_w4RzRODeYTJshkhqY?usp=sharing
https://huggingface.co/xlm-roberta-base
https://huggingface.co/xlm-roberta-large
https://github.com/pytorch/fairseq/tree/main/examples/roberta#results
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.