fedem.client package

Module contents

class fedem.client.Seshu(hf_model_path: str, hf_tokenizer_path: str, target_modules: list[str], hf_adapter_path: str, hf_data_path: str, org_id: str = 'mlsquare', hf_token: str | None = None)[source]

Bases: object

push_to_hub()[source]

Push files to the Hugging Face Hub.

tokenize(data_to_tokenize)[source]

Tokenize the input data.

Parameters:

data_to_tokenize – Data to be tokenized.

Returns:

Tokenized input data.

Return type:

dict

train_lora(training_args: TrainingArguments | None = None, debug: bool = False)[source]

Train the model using LoRA.

Parameters:
  • training_args (TrainingArguments | None, optional) – Training arguments. Defaults to None.

  • debug (bool, optional) – Debug mode flag. Defaults to False.