Accesses to LLMs
Closed-source LLMs
Openai API
The most popular LLMs, GPT4 and ChatGPT(GPT3.5), are from Openai. The techniques and details are not available to the public, which is closed source. However, as long as your instructions are rdy and you have enough money, it's easy to call GPT4/GPT-3.5 to response. You can easily start from the official clear guides. Here's an official example on gpt3.5-turbo to show you how easy it is:
ANTHROPIC API
Not long after the eruption of ChatGPT, ANTHROPIC also announced its own close-source LLM, Claude. You can easily call the API according to the official reference. Here's an official example on claude-2 to show you how easy it is:
GOOGLE API
Google's PaLM2 is available following this link. Here's an official example on palm to show you how easy it is:
It is worthy that the APIs are not free and you could not get access to the inside of the LLMs. For some APIs, there are additional settings such as temperature and services such as fine-tuning. Please read official specifications before your journey!
Open-source LLMs
It seems that countless open-source LLMs are published every day. I will introduce 3 of them which I think are general for some experiments: Alpaca, Vicuna, Llama2. You could implement them in the platform huggingface with the corresponding easy-to-use library, transformers.
First, I would like to introduce huggingface, a platform includes many open-source LLMs and an easy-to-use library, transformers. You could easily download a LLM, make some adjustments and run inference with transformers.
Alpaca/Vicuna are instruction-following LLMs, fine-tuned Llama models on collected self-instructs/user-shared conversations; Llma2 are new LLMs released by Meta. In addition, Vicuna has updated a new version based on Llma2.
To get access to Alpaca, you may have to recovering the weights with haggingface following the steps in the GitHub repository. For Vicuna, several methods, such as Openai-compatible APIs and huggingface generation APIs, are available. You could also apply Llma2 following the corresponding readme by the customized code and transformers library.
Here, with obtained model structures and the corresponding weights for free, you could adjust any detail as you like. However, you may need to change the source codes, construct input contents with the correct format and adjust/write inference codes utilizing libraries such as transformers, langchain and pytorch by yourself.
I think these models are enough for you to start. When they are not, you are rdy to find some you like in huggingface/github...
Some additions for Chinese
Because of the special policy for the country safety, in China, the accesses mentioned above may be limited. Here I would introduce some available accesses in China.
BAIDU QIANFAN
It is a platform inlcudes many services on LLMs. Here we just introduce APIs. QIANFAN includes APIs of not only its own LLM, ERNIE-Bot, but also some open-source LLMs such as BLOOMZ and Llama2. Following the document, we could simply call APIs such as ernie-bot as follows.
ALI DashScope
DashScope is a platform similar to QIANFAN. We could call various APIs of LLMs including Qwen. Follow the corresponding document, we could call APIs such as as Qwen follows.
ALI ModelScope
ModelScope is a platform similar to huggingface. An easy-to-use library is also included.
to be continue
Last updated