Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating mistral vllm implementation to 0.2 + adding support for hf token #286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mistral/mistral-7b-instruct-vllm/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ model_metadata:
avatar_url: https://cdn.baseten.co/production/static/explore/mistral_logo.png
cover_image_url: https://cdn.baseten.co/production/static/explore/mistral.png
engine_args:
model: mistralai/Mistral-7B-Instruct-v0.1
model: mistralai/Mistral-7B-Instruct-v0.2
example_model_input:
prompt: What is the Mistral wind?
pretty_name: Mistral 7B Instruct
Expand All @@ -15,12 +15,13 @@ model_metadata:
model_name: Mistral 7B Instruct vLLM
python_version: py311
requirements:
- vllm==0.2.1.post1
- vllm==0.4.1
resources:
accelerator: A10G
accelerator: A100
memory: 25Gi
use_gpu: true
runtime:
predict_concurrency: 256
secrets: {}
system_packages: []
secrets:
hf_access_token: null
6 changes: 6 additions & 0 deletions mistral/mistral-7b-instruct-vllm/model/model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import uuid
from typing import Any

Expand All @@ -10,6 +11,11 @@ class Model:
def __init__(self, **kwargs) -> None:
self.engine_args = kwargs["config"]["model_metadata"]["engine_args"]
self.prompt_format = kwargs["config"]["model_metadata"]["prompt_format"]
self._secrets = kwargs["secrets"]

if "hf_access_token" in self._secrets._base_secrets.keys():
# Set the environment variable
os.environ["HF_TOKEN"] = self._secrets["hf_access_token"]

def load(self) -> None:
self.llm_engine = AsyncLLMEngine.from_engine_args(
Expand Down
Loading