From the course: Sustainable AI for Developers: Strategies, Techniques, and Best Practices

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Best practices to optimize consumption

Best practices to optimize consumption

- Do you know what's next? You guessed it. Let's talk about what techniques we can use to optimize our resource consumption in natural language processing. As we have discussed before, in other techniques, you always should pick the right model size for the right task. You don't need to use large models for all your task as it may be an overkill. On top of that, you must think about using pruning to remove unnecessary layers and parameters; quantization to lower the proceeds of the model weights; and knowledge distillation to use the teacher-student architecture. For simple tasks like sentiment analysis or text classification, use simple models such as support vector machines, SVMs, or logistical regression. You can also optimize your resource consumption by using efficient training techniques, such as transfer learning where you start with a pre-trained model and fine-tune it for your specific needs instead of training from scratch. As always, early stopping will help you in saving…

Contents