forked from opendatahub-io/opendatahub-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytorch.py
More file actions
18 lines (17 loc) · 735 Bytes
/
pytorch.py
File metadata and controls
18 lines (17 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
GENERATION_PROTO_FILEPATH: str = "utilities/manifests/text-generation-inference/generation.proto"
PYTORCH_TGIS_INFERENCE_CONFIG = {
"default_query_model": {
"query_input": "At what temperature does water boil?",
"query_output": r'\[{"generatedTokenCount":\d+,"text":".*","inputTokenCount":\d+,"stopReason":"MAX_TOKENS"}\]',
"use_regex": True
},
"all-tokens": {
"grpc": {
"endpoint": "fmaas.GenerationService/Generate",
"header": "mm-model-id: $model_name",
"body": '{"requests": [{"text":"$query_input"}]}',
"args": f"-proto {GENERATION_PROTO_FILEPATH}",
"response_fields_map": {"response_output": "responses"},
}
}
}