forked from phoenix/litellm-mirror
Merge pull request #4087 from BerriAI/litellm_update_together_ai_pricing
Update together ai pricing
This commit is contained in:
commit
90ae7f040a
4 changed files with 41 additions and 30 deletions
|
@ -42,16 +42,18 @@ def get_model_params_and_category(model_name) -> str:
|
|||
else:
|
||||
return model_name
|
||||
# Determine the category based on the number of parameters
|
||||
if params_billion <= 3.0:
|
||||
category = "together-ai-up-to-3b"
|
||||
elif params_billion <= 7.0:
|
||||
category = "together-ai-3.1b-7b"
|
||||
elif params_billion <= 20.0:
|
||||
category = "together-ai-7.1b-20b"
|
||||
elif params_billion <= 40.0:
|
||||
category = "together-ai-20.1b-40b"
|
||||
elif params_billion <= 70.0:
|
||||
category = "together-ai-40.1b-70b"
|
||||
if params_billion <= 4.0:
|
||||
category = "together-ai-up-to-4b"
|
||||
elif params_billion <= 8.0:
|
||||
category = "together-ai-4.1b-8b"
|
||||
elif params_billion <= 21.0:
|
||||
category = "together-ai-8.1b-21b"
|
||||
elif params_billion <= 41.0:
|
||||
category = "together-ai-21.1b-41b"
|
||||
elif params_billion <= 80.0:
|
||||
category = "together-ai-41.1b-80b"
|
||||
elif params_billion <= 110.0:
|
||||
category = "together-ai-81.1b-110b"
|
||||
if category is not None:
|
||||
return category
|
||||
|
||||
|
|
|
@ -3009,32 +3009,37 @@
|
|||
"litellm_provider": "sagemaker",
|
||||
"mode": "chat"
|
||||
},
|
||||
"together-ai-up-to-3b": {
|
||||
"together-ai-up-to-4b": {
|
||||
"input_cost_per_token": 0.0000001,
|
||||
"output_cost_per_token": 0.0000001,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-3.1b-7b": {
|
||||
"together-ai-4.1b-8b": {
|
||||
"input_cost_per_token": 0.0000002,
|
||||
"output_cost_per_token": 0.0000002,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-7.1b-20b": {
|
||||
"together-ai-8.1b-21b": {
|
||||
"max_tokens": 1000,
|
||||
"input_cost_per_token": 0.0000004,
|
||||
"output_cost_per_token": 0.0000004,
|
||||
"input_cost_per_token": 0.0000003,
|
||||
"output_cost_per_token": 0.0000003,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-20.1b-40b": {
|
||||
"together-ai-21.1b-41b": {
|
||||
"input_cost_per_token": 0.0000008,
|
||||
"output_cost_per_token": 0.0000008,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-40.1b-70b": {
|
||||
"together-ai-41.1b-80b": {
|
||||
"input_cost_per_token": 0.0000009,
|
||||
"output_cost_per_token": 0.0000009,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-81.1b-110b": {
|
||||
"input_cost_per_token": 0.0000018,
|
||||
"output_cost_per_token": 0.0000018,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together_ai/mistralai/Mixtral-8x7B-Instruct-v0.1": {
|
||||
"input_cost_per_token": 0.0000006,
|
||||
"output_cost_per_token": 0.0000006,
|
||||
|
|
|
@ -560,9 +560,8 @@ def test_together_ai_qwen_completion_cost():
|
|||
"custom_cost_per_second": None,
|
||||
}
|
||||
|
||||
try:
|
||||
litellm.completion_cost(**input_kwargs)
|
||||
except litellm.NotFoundError:
|
||||
pass
|
||||
except Exception:
|
||||
pytest.fail("This should have returned a 'not found error'")
|
||||
response = litellm.cost_calculator.get_model_params_and_category(
|
||||
model_name="qwen/Qwen2-72B-Instruct"
|
||||
)
|
||||
|
||||
assert response == "together-ai-41.1b-80b"
|
||||
|
|
|
@ -3009,32 +3009,37 @@
|
|||
"litellm_provider": "sagemaker",
|
||||
"mode": "chat"
|
||||
},
|
||||
"together-ai-up-to-3b": {
|
||||
"together-ai-up-to-4b": {
|
||||
"input_cost_per_token": 0.0000001,
|
||||
"output_cost_per_token": 0.0000001,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-3.1b-7b": {
|
||||
"together-ai-4.1b-8b": {
|
||||
"input_cost_per_token": 0.0000002,
|
||||
"output_cost_per_token": 0.0000002,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-7.1b-20b": {
|
||||
"together-ai-8.1b-21b": {
|
||||
"max_tokens": 1000,
|
||||
"input_cost_per_token": 0.0000004,
|
||||
"output_cost_per_token": 0.0000004,
|
||||
"input_cost_per_token": 0.0000003,
|
||||
"output_cost_per_token": 0.0000003,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-20.1b-40b": {
|
||||
"together-ai-21.1b-41b": {
|
||||
"input_cost_per_token": 0.0000008,
|
||||
"output_cost_per_token": 0.0000008,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-40.1b-70b": {
|
||||
"together-ai-41.1b-80b": {
|
||||
"input_cost_per_token": 0.0000009,
|
||||
"output_cost_per_token": 0.0000009,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together-ai-81.1b-110b": {
|
||||
"input_cost_per_token": 0.0000018,
|
||||
"output_cost_per_token": 0.0000018,
|
||||
"litellm_provider": "together_ai"
|
||||
},
|
||||
"together_ai/mistralai/Mixtral-8x7B-Instruct-v0.1": {
|
||||
"input_cost_per_token": 0.0000006,
|
||||
"output_cost_per_token": 0.0000006,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue