mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
Config: Fix draft model migration and loading
The loader takes in the "draft" parameter, so map the config model to that when creating kwargs for initial load. Also map the old "draft" key to the new "draft_model" key. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -72,7 +72,7 @@ class TabbyConfig(TabbyConfigModel):
|
||||
|
||||
if model_cfg.get("draft"):
|
||||
legacy = True
|
||||
cfg["draft"] = model_cfg["draft"]
|
||||
cfg["draft_model"] = model_cfg["draft"]
|
||||
|
||||
if model_cfg.get("lora"):
|
||||
legacy = True
|
||||
|
||||
6
main.py
6
main.py
@@ -69,7 +69,11 @@ async def entrypoint_async():
|
||||
model_path = model_path / model_name
|
||||
|
||||
# TODO: remove model_dump()
|
||||
await model.load_model(model_path.resolve(), **config.model.model_dump())
|
||||
await model.load_model(
|
||||
model_path.resolve(),
|
||||
**config.model.model_dump(),
|
||||
draft=config.draft_model.model_dump(),
|
||||
)
|
||||
|
||||
# Load loras after loading the model
|
||||
if config.lora.loras:
|
||||
|
||||
Reference in New Issue
Block a user