Skip to content

Commit

Permalink
change hf config
Browse files Browse the repository at this point in the history
  • Loading branch information
sindhuvahinis committed May 9, 2024
1 parent 144b409 commit abb124e
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,28 @@ def __init__(self):
self.initialized = False
self.adapters = None
self.adapter_registry = {}
self.rb_configs = None
self.hf_configs = None
self.input_format_configs = None

def initialize(self, properties: dict):
self.rb_configs = HuggingFaceProperties(**properties)
self.hf_configs = HuggingFaceProperties(**properties)
self.model_config, self.peft_config = read_model_config(
self.rb_configs.model_id_or_path,
self.rb_configs.trust_remote_code, self.rb_configs.revision)
self.hf_configs.model_id_or_path,
self.hf_configs.trust_remote_code, self.hf_configs.revision)
_rolling_batch_cls = get_rolling_batch_class_from_str(
self.rb_configs.rolling_batch.value, self.rb_configs.is_mpi,
self.hf_configs.rolling_batch.value, self.hf_configs.is_mpi,
self.model_config)
self.rb_configs.kwargs["model_config"] = self.model_config
self.hf_configs.kwargs["model_config"] = self.model_config
self.rolling_batch = _rolling_batch_cls(properties)
self.tokenizer = get_tokenizer(self.rb_configs.model_id_or_path,
self.rb_configs.trust_remote_code,
self.rb_configs.revision,
self.tokenizer = get_tokenizer(self.hf_configs.model_id_or_path,
self.hf_configs.trust_remote_code,
self.hf_configs.revision,
peft_config=self.peft_config)
self.input_format_configs = InputFormatConfigs(
is_rolling_batch=True,
is_adapters_supported=True,
tokenizer=self.tokenizer,
output_formatter=self.rb_configs.output_formatter)
output_formatter=self.hf_configs.output_formatter)
self.initialized = True

def parse_input(
Expand Down

0 comments on commit abb124e

Please sign in to comment.