Comments (3)
Hi @redrussianarmy
Thank you for sharing your experience.
I'll give it a try and let you know.
Tflite doesn't support serving on PC GPUs, but supports mobile GPUs. I don't know if it supports all edge devices GPUs or not.
One question that came to my mind:
Did you try mixing transformers with layer_pruning
feature and tflite conversion with hybrid_quantization
?
k_layers_to_prune = 4 # try different values
config = {
...
...
"layer_pruning": {
"strategy": "top",
"k": k_layers_to_prune
}
}
nlu = TransformerNLU.from_config(config)
nlu.train(train_dataset, val_dataset, epochs, batch_size)
nlu.save(save_path, save_tflite=True, conversion_mode="hybrid_quantization")
nlu = TransformerNLU.load(model_path, quantized=True, num_process=4)
utterance = "add sabrina salerno to the grime instrumentals playlist"
result = nlu.predict(utterance)
from dialog-nlu.
Hi @MahmoudWahdan
Thank you for your quick reply.
I have tried mixing transformers with layer_pruning feature and tflite conversion with hybrid_quantization as you mentioned. Unfortunately, the result is same. Prediction does not work on GPU of Nvidia Jetson Xavier.
I am looking forward to seeing new TensorRT conversion feature :)
from dialog-nlu.
Hi @redrussianarmy
Sure, This is a new thing that I'll try and of course it will be useful.
I'll keep you updated.
from dialog-nlu.
Related Issues (20)
- Add support to Joint trans model in bert_nlu_basic_api.py HOT 1
- Cannot load huggingface model HOT 2
- Difficulty in TFLite Conversion HOT 2
- Incremental training not working on Huggingface Trans model HOT 4
- Make first version of dialog nlu library HOT 1
- Support tflite conversion and serving HOT 4
- Typo error in bert_nlu_basic_api.py HOT 1
- ModuleNotFoundError HOT 6
- Add unit tests HOT 4
- pip install . doesnt work well HOT 2
- # create a joint NLU model from configurations nlu_model = TransformerNLU.from_config(config) error HOT 3
- Add examples notebooks HOT 1
- Provide documentation
- unexpected keyword argument 'use_cdn' error HOT 5
- Prediction function for tflite model not working HOT 7
- Can not import BertCrfNLU HOT 4
- Add Arabic NLU Dataset and examples HOT 2
- islamic dataset HOT 1
- Way lower accuracy than example notebooks 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 dialog-nlu.