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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more