DEV Community

Cover image for πŸš¨πŸ† Top 5 Open-source Alternatives for LLM Development You Must Know About πŸ’₯
Jeffrey Ip
Jeffrey Ip

Posted on

πŸš¨πŸ† Top 5 Open-source Alternatives for LLM Development You Must Know About πŸ’₯

TL:DR

I'm not a fan of closed-source, especially when it comes to LLM application development πŸ‘Ž But thankfully, for every closed-source framework in nature there ought to be an equal open-source counterpart (after all, isn't this the third law of some famous scientistπŸ€”?).

So in this article, as someone who have soaked and bathed in the LLM development rabbit hole πŸ‡ for more than two years, I'm going to let you know five most important open-source alternatives for closed-source LLM development solutions.

Here we go!πŸ™Œ


(PS. please star all the open-source repos to help them gain awareness over their closed-source counterparts!)

1. DeepEval >> Humanloop

DeepEval is the open-source LLM evaluation frameworkπŸ‘, while Humanloop, well you guessed it, is a closed-source LLM evaluation solution πŸ‘Ž, with hidden API endpoints, instead of open algorithms that you can see how evaluation is carried out.

This is top of the list because in my opinion, nothing is more important than open LLM evaluation πŸ’―. Openness allows for transparency, and transparency, especially in LLM development, allows everyone to see what the standard of evaluation is. You wouldn't want some LLM safety evaluation to be done behind close doors, while you simply get informed of the results, right?

Open-source code gets scrutinized all the time, which helps DeepEval to be is much easier to use than Humanloop. Here's how to evaluate your LLM application in DeepEval:

from deepeval import evaluate
from deepeval.metrics import AnswerRelevancyMetric
from deepeval.test_case import LLMTestCase

test_case = LLMTestCase(
 input="How many evaluation metrics does DeepEval offers?",
 actual_output="14+ evaluation metrics"
)
metric = AnswerRelevancyMetric()

evaluate(test_cases=[test_case], metrics=[metric])
Enter fullscreen mode Exit fullscreen mode

🌟 Star DeepEval on GitHub

Github stars
(DeepEval's humble mascot wants a star)


2. Llama3.1 >> Open AI GPT-4

I bet you saw this coming, but the next on the list is Meta's Llama3.1 vs OpenAI's GPT-4. Llama3.1 can be self-hosted, with much faster inference times and cheaper token costs than GPT-4, and the best part is it is open-source, with open-weights. What does this mean?

This means if you want to customize Llama3.1, which by the way performs as good as GPT-4 on several benchmarks, you will be able to do it yourself. The millions (or billions?) of dollars Meta spent on training Llama3.1 can be leveraged by literally anyone, and available for fine-tuning.

Use Llama3.1 today:

import transformers
import torch

model_id = "meta-llama/Llama-3.1-8B"

pipeline = transformers.pipeline(
    "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
)

response = pipeline("Hey how are you doing today?")
Enter fullscreen mode Exit fullscreen mode

3. LangChain >> OpenAI Assistants

I'm sorry OpenAI, it's you again. LangChain is an LLM application orchestration framework, while OpenAI Assistants is like a RAG API, with the inner orchestration logic hidden behind close doors.

I know, I'm using big words and this sounds very fancy, but let me explain what each of those means. LLM orchestration simply means connecting external data to your LLM, and allowing your LLM to fetch data as it see fits by giving it access to your APIs. For example, a chatbot reporting the daily weather to you that's built on LangChain would allow the LLM to fetch the latest weather for today. In OpenAI assistants, they've hidden it all away behind an API.

This means it's not as customizable, and quite frankly, I haven't met a single person who uses the Assistants feature even though it was hugely hyped up as the next big thing.

🌟 Star on GitHub


4. Flowise >> Relevance AI

So while LangChain allows you to build your LLM application in code. Flowise allows you to do it via an UI, in a open-source way. Simply click and drop to customize what data your LLM has access to, and you're pretty much good to go.

The alternative? A slightly less pretty paid version if it.

Look at Flowise:

Image description

🌟 Star on GitHub


5. Lite LLM >> Martian AI

Lite LLM is an open-source library that allows you to switch out LLMs for LLMs in a single line of code, while Martian on the other hand, is a closed-source version of it.

Ok not quite, in reality, although both allows you to switch out LLMs for LLMs, Martian AI is an LLM router, meaning it chooses the best LLM for each input to your LLM to optimize on accuracy, speed, and cost.

In this rare occasion, I'd have to say both are pretty good products.

🌟 Star on GitHub

Martian AI here: https://withmartian.com/


So there you have it, the list of open-source vs closed-source LLM development tools you should definitely know about. Think there's something I've missed? Comment below to let me know!

Thank you for reading, and till next time 😊

Top comments (4)

Collapse
 
loomy_tunes profile image
Loomy Tunes

Thanks for this

Collapse
 
guybuildingai profile image
Jeffrey Ip

:)

Collapse
 
avid_reader_123 profile image
Avid Reader

Great read.

Collapse
 
guybuildingai profile image
Jeffrey Ip

Anytime