dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
8.93k stars 1.86k forks source link

Is it possible to make a CHATGPT Clone with ML.NET ? #6909

Open Amine-Smahi opened 6 months ago

Amine-Smahi commented 6 months ago

Hi team,

is it possible to create a ChatGPT clone trained on own data using ML.NET ?

I'm really in need for feedback before deciding to get into ML.NET for my company.

Thanks for the good work

feiyun0112 commented 6 months ago

You should use Azure OpanAI to implement

https://learn.microsoft.com/en-us/semantic-kernel/overview/

Amine-Smahi commented 6 months ago

@feiyun0112 My company dont want to use a cloud provider

torronen commented 5 months ago

@Amine-Smahi OpenAI models (ChatGPT, GPT-4 etc.) are not public and can not be ran by anyone else except OpenAI and Microsoft at the moment. Only alternative to use one of the publicly available models. The leaderboard fo them can be found from https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard These are just the models, and we need to either implement our own API to run them or use a premade project such as Ollama

I suggest to start with the small models, 7B or less, first. It is best to have 16 Gb or more GPU memory, but there are ways to run on smaller models. As I understand Mac's are able to also utilize RAM but not on other PC's.

I think the most common production machine has Nvidia A100 40Gb or 80Gb or multiple. Depending on the use case it can be a cost concern. I think it starts from a 2000 usd per month.

Even when running the highest ranked models it is best not to expect ChatGPT level performance in other language than English unless you will finetune the models.

torronen commented 5 months ago

I just remembered Microsoft released Llama 2 ONNX-version. Maybe it is possible to run with Microsoft.ML. Although I think it might not be the quickest route. https://github.com/microsoft/Llama-2-Onnx

They also provide a sample app with Python.

hannespreishuber commented 1 month ago

phi-3 and Microsoft.ML.OnnxRuntimeGenAI https://onnxruntime.ai/docs/genai/tutorials/phi2-python.html