This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import TypedDict | |
| DisplacyDepsWords = TypedDict( | |
| "DisplacyDepsWords", {"text": str, "tag": str, "lemma": Optional[str]} | |
| ) | |
| DisplacyDepsArcs = TypedDict( | |
| "DisplacyDepsArcs", {"start": int, "end": int, "label": str, "dir": str} | |
| ) | |
| DisplacyDepsData = TypedDict( | |
| "DisplacyDepsData", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def ndict(*args): | |
| """Return a dictionary with the given keys and their values from globals.""" | |
| g = globals() | |
| result = {} | |
| for arg in args: | |
| if arg in g: | |
| result[arg] = g[arg] | |
| else: | |
| raise KeyError(f"Key '{arg}' not found in globals") | |
| return result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://docs.mistral.ai/self-deployment/vllm/ | |
| export HF_TOKEN=<Huggingface Token> | |
| docker run --gpus all \ | |
| -e HF_TOKEN=$HF_TOKEN -p 8000:8000 \ | |
| ghcr.io/mistralai/mistral-src/vllm:latest \ | |
| --host 0.0.0.0 \ | |
| --model mistralai/Mistral-7B-Instruct-v0.2 |
OlderNewer