File size: 676 Bytes
fedd8d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# MedGemma 模型配置
# 此文件定义了 MedGemma 模型的基础配置结构

from onescience.models.protenix.config.extend_types import (
    RequiredValue,
    ValueMaybeNone,
)

# MedGemma 基础配置
MEDGEMMA_BASE_CONFIG = {
    "variant": RequiredValue(str),  # "4b" or "27b"
    "model_path": RequiredValue(str),
    "tokenizer_path": ValueMaybeNone(str),
    "prompt_format": "chat",
    "is_multimodal": True,
}

# 推理配置
MEDGEMMA_INFERENCE_CONFIG = {
    "gpu_memory_utilization": 0.9,
    "max_model_len": ValueMaybeNone(int),
    "tensor_parallel_size": 1,
    "default_max_tokens": 500,
    "temperature": 0.7,
    "top_p": 0.9,
    "batch_size": 1,
}