Skip to content

Commit

Permalink
Update 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuminh65 committed Mar 17, 2024
1 parent 83ab759 commit 946f796
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 15 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
101 changes: 100 additions & 1 deletion api4all/data/constant_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": {
Expand All @@ -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
},
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down

0 comments on commit 946f796

Please sign in to comment.