profile

Machine Learning for Medical Imaging

Big problem with ChatGPT based Chatbots

Published about 1 year agoΒ β€’Β 2 min read

Hi Reader,,

Welcome to the PYCAD newsletter, where every week you receive doses of machine learning and computer vision techniques and tools to help you learn how to build AI solutions to empower the most vulnerable members of our society, patients.

How to have more control over ChatGPT based custom chatbots

If you try to build a chatbot based on ChatGPT with your own data, you might face a big issue.

Your chatbot may start to spit out some non sensical responses.

For example, if your chatbot is for a support system for clothing, if a user asks the chatbot about food, it might actually answer him!

You definitely don’t want this.

A more reliable behavior would be:

If a user asks about food, say you don’t have information about that topic.

But how can you have that type of control over LLMs?

This is where NeMo Guardrails comes to the picture.

It’s an open-source toolkit for easily adding programmable guardrails to LLM-based conversational systems.

Guardrails (or β€œrails” for short) are specific ways of controlling the output of a large language model.

For example you can have control over:

  • Not talking about politics.
  • Responding in a particular way to specific user requests.
  • Following a predefined dialog path.
  • Using a particular language style.
  • Extracting structured data, and more.

In the image below, you see a configuration that controls how your Chatbot should respond to an insult from a user!

More info about NeMo Guardrails can be found here.

Deep Learning Compiler with Pytorch 2.0

In traditional software engineering, you have software compilers.

What’s the equivalent in deep learning engineering?

Well, deep learning compilers!

A deep learning compiler translates high-level code written in deep learning frameworks into optimized lower level hardware specific code to accelerate training and inference.

Deep learning compilers have to work with highly-parallelizable code often accelerated on specialized AI accelerator hardware such as:

  • GPUs,
  • TPUs,
  • AWS Trainium/Inferentia,
  • Intel Habana Gaudi etc.

To improve performance, a deep learning compiler has to take advantage of hardware specific features such as:

  • Mixed precision support.
  • Performance optimized kernels

Pytorch-2.0 has a deep learning compiler. You can invoke it using a single line of code:

torch.compile()

This can yield hardware specific, highly optimized Pytorch models! With a single line of code!

A code example can be seen below ↓

Here's a full tutorial on Pytorch deep learning compiler.


HIT THE INBOX OF MORE THAN 1500 MACHINE LEARNING PRACTITIONERS

Advertise with AIFEE to get your brand in front of hundreds of readers who are eager to start or accelerate their machine learning careers by learning about the latest and greatest in machine learning from: books, courses or online communities.

Many of our readers are also looking for machine learning related jobs.

​Get in touch today.


​

What'd you think of today's edition?

​

Machine Learning for Medical Imaging

by Nour Islam Mokhtari from pycad.co

πŸ‘‰ Learn how to build AI systems for medical imaging domain by leveraging tools and techniques that I share with you! | πŸ’‘ The newsletter is read by people from: Nvidia, Baker Hughes, Harvard, NYU, Columbia University, University of Toronto and more!

Read more from Machine Learning for Medical Imaging

Hi Reader,, Welcome to the PYCAD newsletter, where every week you receive doses of machine learning and computer vision techniques and tools to help you learn how to build AI solutions to empower the most vulnerable members of our society, patients. TotalSegmentator : Whole Body Segmentation at your Fingertips This free tool available online can do full body segmentation, it's called TotalSegmentator. I have already mentioned this tool in a previous edition of the newsletter, but in this...

9 days agoΒ β€’Β 3 min read

Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below ↓ A Medical Imaging Expert Told Me This Recently I saw a post on LinkedIn where a medical imaging expert showcased his work of segmenting the lungs and its bronchial trees. You can...

16 days agoΒ β€’Β 2 min read

Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below ↓ How we helped accelerate inference time for a client's AI product Below is a screenshot of a benchmark we did for a client of ours. The goal was to accelerate inference time. This...

22 days agoΒ β€’Β 3 min read
Share this post