Skip to content

Commit

Permalink
Fix base model
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaddair committed Apr 1, 2024
1 parent 26f6d41 commit 74d002e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router/src/infer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Batching and inference logic
use crate::adapter::{extract_adapter_params, Adapter};
use crate::adapter::{extract_adapter_params, Adapter, BASE_MODEL_ADAPTER_ID};
use crate::queue::AdapterEvent;
use crate::scheduler::AdapterScheduler;
use crate::validation::{Validation, ValidationError};
Expand Down Expand Up @@ -71,7 +71,7 @@ impl Infer {
// Initialize with base model adapter (empty) mapping to index 0
let adapter_to_index = Arc::new(Mutex::new(HashMap::from([(
AdapterParameters {
adapter_ids: vec!["".to_string()],
adapter_ids: vec![BASE_MODEL_ADAPTER_ID.to_string()],
..Default::default()
},
0,
Expand Down
1 change: 1 addition & 0 deletions server/lorax_server/models/flash_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def from_pb(
max_length = max(max_length, input_length + max_new_tokens)

adapter_indices = torch.cat(adapter_indices_list).to(dtype=torch.int64, device=device)
print("!!! ADAPTER INDICES", adapter_indices)

request_tokenizers = [
tokenizers.get_tokenizer(r.adapter_index, tokenizer)
Expand Down

0 comments on commit 74d002e

Please sign in to comment.