From 46f4aa1ca538a5e215a5c21db8c3085f354a73e4 Mon Sep 17 00:00:00 2001 From: Justin Hayes Date: Wed, 22 May 2024 12:01:47 -0400 Subject: [PATCH] Adjust default params --- pipelines/examples/mlx_pipeline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pipelines/examples/mlx_pipeline.py b/pipelines/examples/mlx_pipeline.py index 04e43be..9414e9b 100644 --- a/pipelines/examples/mlx_pipeline.py +++ b/pipelines/examples/mlx_pipeline.py @@ -23,7 +23,7 @@ class Pipeline: self.process = None self.model = os.getenv('MLX_MODEL', 'mistralai/Mistral-7B-Instruct-v0.2') # Default model if not set in environment variable self.port = self.find_free_port() - self.stop_sequences = os.getenv('MLX_STOP', None) # Stop sequences from environment variable + self.stop_sequences = os.getenv('MLX_STOP', '[INST]') # Stop sequences from environment variable @staticmethod def find_free_port(): @@ -74,8 +74,8 @@ class Pipeline: MODEL = self.model # Extract additional parameters from the body - temperature = body.get("temperature", 1.0) - max_tokens = body.get("max_tokens", 100) + temperature = body.get("temperature", 0.8) + max_tokens = body.get("max_tokens", 1000) top_p = body.get("top_p", 1.0) repetition_penalty = body.get("repetition_penalty", 1.0) stop = self.stop_sequences