DEV Community

Julien Simon
Julien Simon

Posted on • Originally published at julsimon.Medium on

Migrating from OpenAI models to Hugging Face models

In this video, I show how you can easily migrate your applications from OpenAI models to Hugging Face open-source models.

First, we deploy a Llama3 8B model on an Inference Endpoint hosted on Google Cloud, and we invoke it with the OpenAI client library.

Then, we deploy a Zephyr 7B model on Amazon SageMaker and invoke the endpoint with the OpenAI Messages API.

It couldn’t be simpler to enjoy the many benefits of open-source models, without having to rewrite your app :)

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay