From 1d7eff68121158aaf60ac86c39093de7a740d3ee Mon Sep 17 00:00:00 2001 From: Justin Hayes Date: Wed, 29 May 2024 09:02:12 -0400 Subject: [PATCH] update default values --- pipelines/examples/anthropic_manifold_pipeline.py | 8 ++++---- pipelines/examples/mlx_pipeline.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pipelines/examples/anthropic_manifold_pipeline.py b/pipelines/examples/anthropic_manifold_pipeline.py index bfd3c14..3187bab 100644 --- a/pipelines/examples/anthropic_manifold_pipeline.py +++ b/pipelines/examples/anthropic_manifold_pipeline.py @@ -74,8 +74,8 @@ class Pipeline: stream = self.client.messages.create( model=model_id, messages=messages, - max_tokens=body.get("max_tokens", 1024), - temperature=body.get("temperature", 1.0), + max_tokens=body.get("max_tokens", 4096), + temperature=body.get("temperature", 0.8), top_k=body.get("top_k", 40), top_p=body.get("top_p", 0.9), stop_sequences=body.get("stop", []), @@ -92,8 +92,8 @@ class Pipeline: response = self.client.messages.create( model=model_id, messages=messages, - max_tokens=body.get("max_tokens", 1024), - temperature=body.get("temperature", 1.0), + max_tokens=body.get("max_tokens", 4096), + temperature=body.get("temperature", 0.8), top_k=body.get("top_k", 40), top_p=body.get("top_p", 0.9), stop_sequences=body.get("stop", []), diff --git a/pipelines/examples/mlx_pipeline.py b/pipelines/examples/mlx_pipeline.py index 70e40a8..05db3fb 100644 --- a/pipelines/examples/mlx_pipeline.py +++ b/pipelines/examples/mlx_pipeline.py @@ -74,9 +74,9 @@ class Pipeline: headers = {"Content-Type": "application/json"} # Extract and validate parameters from the request body - max_tokens = body.get("max_tokens", 1024) + max_tokens = body.get("max_tokens", 4096) if not isinstance(max_tokens, int) or max_tokens < 0: - max_tokens = 1024 # Default to 1024 if invalid + max_tokens = 4096 # Default to 4096 if invalid temperature = body.get("temperature", 0.8) if not isinstance(temperature, (int, float)) or temperature < 0: