Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions server/src/common/backend_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ std::unique_ptr<ModelBackend> create_backend(const BackendArgs & args) {
LagunaBackendArgs lcfg;
lcfg.target_path = args.model_path;
lcfg.draft_path = args.draft_path ? args.draft_path : "";
lcfg.draft_loras = args.draft_loras;
lcfg.draft_gpu = args.draft_device.gpu;
lcfg.draft_ctx_max = args.draft_ctx_max;
lcfg.ddtree_mode = args.ddtree_mode;
Expand Down
3 changes: 3 additions & 0 deletions server/src/common/backend_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
#pragma once

#include "model_backend.h"
#include "internal.h"
#include "placement/placement_config.h"
#include "placement/remote_draft_config.h"
#include "placement/remote_target_shard_config.h"

#include <memory>
#include <string>
#include <vector>

namespace dflash::common {

Expand All @@ -29,6 +31,7 @@ struct BackendArgs {

// Optional: speculative decode draft model (qwen35 only)
const char * draft_path = nullptr;
std::vector<DraftLoraSpec> draft_loras;

// Device placement
DevicePlacement device;
Expand Down
3 changes: 3 additions & 0 deletions server/src/common/model_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ struct GenerateRequest {
// path returns success but emits no tokens, so each backend can route the
// retry through its existing AR path without copying retry policy.
bool force_ar_decode = false;
// Optional request-selected DFlash draft LoRA variant. Empty uses the
// backend default; "base" selects the unadapted draft when available.
std::string draft_lora;
};

struct GenerateResult {
Expand Down
Loading
Loading