mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-24 19:14:23 +00:00
Unify temperature options for Vlm models
This commit is contained in:
parent
215b540f6c
commit
34d446cb98
@ -12,6 +12,7 @@ class BaseVlmOptions(BaseModel):
|
|||||||
prompt: str
|
prompt: str
|
||||||
scale: float = 2.0
|
scale: float = 2.0
|
||||||
max_size: Optional[int] = None
|
max_size: Optional[int] = None
|
||||||
|
temperature: float = 0.0
|
||||||
|
|
||||||
|
|
||||||
class ResponseFormat(str, Enum):
|
class ResponseFormat(str, Enum):
|
||||||
@ -51,7 +52,6 @@ class InlineVlmOptions(BaseVlmOptions):
|
|||||||
AcceleratorDevice.MPS,
|
AcceleratorDevice.MPS,
|
||||||
]
|
]
|
||||||
|
|
||||||
temperature: float = 0.0
|
|
||||||
stop_strings: List[str] = []
|
stop_strings: List[str] = []
|
||||||
extra_generation_config: Dict[str, Any] = {}
|
extra_generation_config: Dict[str, Any] = {}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class ApiVlmModel(BasePageModel):
|
|||||||
)
|
)
|
||||||
self.params = {
|
self.params = {
|
||||||
**self.vlm_options.params,
|
**self.vlm_options.params,
|
||||||
"temperature": 0,
|
"temperature": self.vlm_options.temperature,
|
||||||
}
|
}
|
||||||
|
|
||||||
def __call__(
|
def __call__(
|
||||||
|
Loading…
Reference in New Issue
Block a user