From 946f7967fe8f3fc7f96e19b88b12f3a692b3c6db Mon Sep 17 00:00:00 2001 From: hieuminh65 Date: Sat, 16 Mar 2024 23:42:27 -0400 Subject: [PATCH] Update 0.3.1 --- CHANGELOG.md | 7 +++ README.md | 26 ++++----- api4all/data/constant_data.py | 101 +++++++++++++++++++++++++++++++++- pyproject.toml | 2 +- 4 files changed, 121 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a401854..c7871a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.3.1] - 2024-03-16 + +### Added +- Refined the README file. +- Add Lepton provider +- Add code llama70B, mistral-7b-instruct-v0.1, mistral-7b-instruct-v0.2 + ## [0.3.0] - 2024-03-15 ### Added diff --git a/README.md b/README.md index dbe02b8..0968317 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Easy-to-use LLM API from a state-of-the-art provider and comparison. pip3 install api4all ``` -#### 2. Create and activate a virtual environment (optional but recommended) +#### 2. **Optional** - Create and activate a virtual environment - Unix / macOS ```bash python3 -m venv venv @@ -110,19 +110,19 @@ Request ID - fa8cebd0-265a-44b2-95d7-6ff1588d2c87 - Rate limit is based on the free plan of the provider. The actual rate limit may be different based on the plan you choose. ### Open-source models - -- |Mixtral-8x7b-Instruct-v0.1 | Gemma 7B it | Mistral-7B-Instruct-v0.1 | LLaMA2-70b | -|:------:|:------:|:------:|:------:|:------:| -| API string name | "mistralai/Mixtral-8x7B-Instruct-v0.1" | "google/gemma-7b-it" | ✕ | "meta/Llama-2-70b-chat-hf" | -| Context Length | 32,768 | 8.192 | 4,096 | 4,096 + -- |Mixtral-8x7b-Instruct-v0.1 | Gemma 7B it | Mistral-7B-Instruct-v0.1 | LLaMA2-70b | Mistral-7B-Instruct-v0.2 | CodeLlama-70b-Instruct +|:------:|:------:|:------:|:------:|:------:|:------:|:------:| +| API string name | "mistralai/Mixtral-8x7B-Instruct-v0.1" | "google/gemma-7b-it" | "mistralai/Mistral-7B-Instruct-v0.1" | "meta/Llama-2-70b-chat" | "mistralai/Mistral-7B-Instruct-v0.2" | "meta/CodeLlama-2-70b-intruct" | +| Context Length | 32,768 | 8.192 | 4,096 | 4,096 | 32,768 | Developer | Mistral AI | Google | Mistral AI | Meta -| Cost (Input - Output / MTokens) | ----- | ------ | ------ | ----- -| [Groq](https://wow.groq.com) | $0-$0 | $0-$0 | ✕ | $0-$0 -| [Anyscale](https://www.anyscale.com) | $0.5-$0.5 | $0.15-$0.15 | $0.15-$0.15 | $1.0-$1.0 -| [Together AI](https://www.together.ai)| $0.6-$0.6 | $0.2-$0.2 | $0.2-$0.2 | $0.9-$0.9 -| [Replicate](https://replicate.com) | $0.3-$1 | ✕ | $0.05-$0.25 | $0.65-$2.75 -| [Fireworks](https://fireworks.ai) | $0.5-$0.5 | $0.2-$0.2 | $0.2-$0.2 | $0.9-$0.9 -| [Deepinfra](https://deepinfra.com) | $0.27-$0.27 | ✕ | ✕ | $0.7-$0.9 -| [Lepton](https://www.lepton.ai) | $0.5-$0.5 | ✕ | ✕ | $0.8-$0.8 +| **Cost (Input - Output / MTokens)** | ----- | ------ | ------ | ----- +| [Groq](https://wow.groq.com) | $0-$0 | $0-$0 | ✕ | $0-$0 | ✕ | ✕ +| [Anyscale](https://www.anyscale.com) | $0.5-$0.5 | $0.15-$0.15 | $0.05-$0.25 | $1.0-$1.0 | ✕ | $1.0-$1.0 +| [Together AI](https://www.together.ai)| $0.6-$0.6 | $0.2-$0.2 | $0.2-$0.2 | $0.9-$0.9 | $0.05-$0.25 | $0.9-$0.9 +| [Replicate](https://replicate.com) | $0.3-$1 | ✕ | $0.05-$0.25 | $0.65-$2.75 | $0.2-$0.2 | $0.65-$2.75 +| [Fireworks](https://fireworks.ai) | $0.5-$0.5 | ✕ | $0.2-$0.2 | $0.9-$0.9 | $0.2-$0.2 | $0.9-$0.9 +| [Deepinfra](https://deepinfra.com) | $0.27-$0.27 | $0.13-$0.13 | $0.13-$0.13 | $0.7-$0.9 | ✕ | $0.7-$0.9 +| [Lepton](https://www.lepton.ai) | $0.5-$0.5 | ✕ | ✕ | $0.8-$0.8 | ✕ | ✕ ### Closed-source models #### 1. Mistral AI diff --git a/api4all/data/constant_data.py b/api4all/data/constant_data.py index f2945a3..41feeb8 100644 --- a/api4all/data/constant_data.py +++ b/api4all/data/constant_data.py @@ -287,7 +287,7 @@ }, "context-length": 100000 }, - "meta/Llama-2-70b-chat-hf": { + "meta/Llama-2-70b-chat": { "provider": { "anyscale": { "name": "meta-llama/Llama-2-70b-chat-hf", @@ -341,6 +341,46 @@ }, "context-length": 4096 }, + "meta/CodeLlama-2-70b-intruct": { + "provider": { + "anyscale": { + "name": "codellama/CodeLlama-70b-Instruct-hf", + "price": { + "input": 1, + "output": 1 + } + }, + "together": { + "name": "meta-llama/Llama-2-70b-chat-hf", + "price": { + "input": 0.9, + "output": 0.9 + } + }, + "replicate": { + "name": "meta/codellama-70b-instruct:a279116fe47a0f65701a8817188601e2fe8f4b9e04a518789655ea7b995851bf", + "price": { + "input": 0.65, + "output": 2.75 + } + }, + "fireworks": { + "name": "llama-v2-70b-code-instruct", + "price": { + "input": 0.9, + "output": 0.9 + } + }, + "deepinfra": { + "name": "codellama/CodeLlama-70b-Instruct-hf", + "price": { + "input": 0.7, + "output": 0.9 + } + } + }, + "context-length": 4096 + }, "google/gemini-1.0-pro": { "provider": { "google": { @@ -353,4 +393,63 @@ }, "context-length": 32768 }, + "mistralai/Mistral-7B-Instruct-v0.1": { + "provider": { + "anyscale": { + "name": "mistralai/Mistral-7B-Instruct-v0.1", + "price": { + "input": 0.15, + "output": 0.15 + } + }, + "replicate": { + "name": "mistralai/mistral-7b-instruct-v0.1:5fe0a3d7ac2852264a25279d1dfb798acbc4d49711d126646594e212cb821749", + "price": { + "input": 0.05, + "output": 0.25 + } + }, + "together": { + "name": "mistralai/Mistral-7B-Instruct-v0.1", + "price": { + "input": 0.2, + "output": 0.2 + } + }, + "deepinfra": { + "name": "mistralai/Mistral-7B-Instruct-v0.1", + "price": { + "input": 0.13, + "output": 0.13 + } + } + }, + "context-length": 8192 + }, + "mistralai/Mistral-7B-Instruct-v0.2": { + "provider": { + "replicate": { + "name": "mistralai/mistral-7b-instruct-v0.2", + "price": { + "input": 0.05, + "output": 0.25 + } + }, + "together": { + "name": "mistralai/Mistral-7B-Instruct-v0.2", + "price": { + "input": 0.2, + "output": 0.2 + } + }, + "fireworks": { + "name": "mistral-7b-instruct-v0p2", + "price": { + "input": 0.2, + "output": 0.2 + } + } + }, + "context-length": 32768 + }, } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 720f10f..a43c4da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "google-generativeai == 0.4.1", ] name = "api4all" -version = "0.3.0" +version = "0.3.1" requires-python = ">=3.8" authors = [ {name = "Hieu Nguyen", email = "hieung.tech@gmail.com"}