Skip to content

Commit

Permalink
build(model_prices_and_context_window.json): add new dbrx llama 3.3 m…
Browse files Browse the repository at this point in the history
…odel

fixes llama cost calc on databricks
  • Loading branch information
krrishdholakia committed Dec 11, 2024
1 parent 5885ee5 commit 5ec649b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
13 changes: 13 additions & 0 deletions litellm/model_prices_and_context_window_backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -7265,6 +7265,19 @@
"source": "https://www.databricks.com/product/pricing/foundation-model-serving",
"metadata": {"notes": "Input/output cost per token is dbu cost * $0.070, based on databricks Llama 3.1 70B conversion. Number provided for reference, '*_dbu_cost_per_token' used in actual calculation."}
},
"databricks/meta-llama-3.3-70b-instruct": {
"max_tokens": 128000,
"max_input_tokens": 128000,
"max_output_tokens": 128000,
"input_cost_per_token": 0.00000100002,
"input_dbu_cost_per_token": 0.000014286,
"output_cost_per_token": 0.00000299999,
"output_dbu_cost_per_token": 0.000042857,
"litellm_provider": "databricks",
"mode": "chat",
"source": "https://www.databricks.com/product/pricing/foundation-model-serving",
"metadata": {"notes": "Input/output cost per token is dbu cost * $0.070, based on databricks Llama 3.1 70B conversion. Number provided for reference, '*_dbu_cost_per_token' used in actual calculation."}
},
"databricks/databricks-dbrx-instruct": {
"max_tokens": 32768,
"max_input_tokens": 32768,
Expand Down
4 changes: 3 additions & 1 deletion litellm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4377,6 +4377,9 @@ def _strip_model_name(model: str, custom_llm_provider: Optional[str]) -> str:
):
strip_version = _strip_stable_vertex_version(model_name=model)
return strip_version
elif custom_llm_provider and (custom_llm_provider == "databricks"):
strip_version = _strip_stable_vertex_version(model_name=model)
return strip_version
else:
strip_finetune = _strip_openai_finetune_model_name(model_name=model)
return strip_finetune
Expand Down Expand Up @@ -4542,7 +4545,6 @@ def _get_max_position_embeddings(model_name):
)

#########################

supported_openai_params = litellm.get_supported_openai_params(
model=model, custom_llm_provider=custom_llm_provider
)
Expand Down
13 changes: 13 additions & 0 deletions model_prices_and_context_window.json
Original file line number Diff line number Diff line change
Expand Up @@ -7265,6 +7265,19 @@
"source": "https://www.databricks.com/product/pricing/foundation-model-serving",
"metadata": {"notes": "Input/output cost per token is dbu cost * $0.070, based on databricks Llama 3.1 70B conversion. Number provided for reference, '*_dbu_cost_per_token' used in actual calculation."}
},
"databricks/meta-llama-3.3-70b-instruct": {
"max_tokens": 128000,
"max_input_tokens": 128000,
"max_output_tokens": 128000,
"input_cost_per_token": 0.00000100002,
"input_dbu_cost_per_token": 0.000014286,
"output_cost_per_token": 0.00000299999,
"output_dbu_cost_per_token": 0.000042857,
"litellm_provider": "databricks",
"mode": "chat",
"source": "https://www.databricks.com/product/pricing/foundation-model-serving",
"metadata": {"notes": "Input/output cost per token is dbu cost * $0.070, based on databricks Llama 3.1 70B conversion. Number provided for reference, '*_dbu_cost_per_token' used in actual calculation."}
},
"databricks/databricks-dbrx-instruct": {
"max_tokens": 32768,
"max_input_tokens": 32768,
Expand Down

0 comments on commit 5ec649b

Please sign in to comment.