Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/databrickslabs/dolly
/ functions
Functions
20 in github.com/databrickslabs/dolly
⨍
Functions
20
◇
Types & classes
2
↳
Endpoints
1
↓ 4 callers
Function
load_model_tokenizer_for_generate
Loads the model and tokenizer so that it can be used for generating responses. Args: pretrained_model_name_or_path (str): name or path fo
training/generate.py:25
↓ 2 callers
Function
generate_response
Given an instruction, uses the model and tokenizer to generate a response. This formats the instruction in the instruction format that the model
training/generate.py:220
↓ 2 callers
Function
get_special_token_id
Gets the token ID for a given string that has been added to the tokenizer as a special token. When training, we configure the tokenizer so that t
training/generate.py:43
↓ 2 callers
Function
load_tokenizer
(pretrained_model_name_or_path: str = DEFAULT_INPUT_MODEL)
training/trainer.py:120
↓ 2 callers
Function
load_training_dataset
(path_or_dataset: str = DEFAULT_TRAINING_DATASET)
training/trainer.py:88
↓ 1 callers
Function
get_model_tokenizer
( pretrained_model_name_or_path: str = DEFAULT_INPUT_MODEL, *, gradient_checkpointing: bool = False )
training/trainer.py:138
↓ 1 callers
Function
load_model
( pretrained_model_name_or_path: str = DEFAULT_INPUT_MODEL, *, gradient_checkpointing: bool = False )
training/trainer.py:128
↓ 1 callers
Function
main
(**kwargs)
training/trainer.py:323
↓ 1 callers
Function
preprocess_dataset
Loads the training dataset and tokenizes it so it is ready for training. Args: tokenizer (AutoTokenizer): Tokenizer tied to the model.
training/trainer.py:148
↓ 1 callers
Function
train
( *, input_model: str, local_output_dir: str, dbfs_output_dir: str, epochs: int, per_d
training/trainer.py:182
Method
__init__
Initialize the pipeline Args: do_sample (bool, optional): Whether or not to use sampling. Defaults to True. max_new_t
training/generate.py:66
Function
_add_text
(rec)
training/trainer.py:93
Method
_forward
(self, model_inputs, **generate_kwargs)
training/generate.py:126
Method
_sanitize_parameters
(self, return_full_text: bool = None, **generate_kwa
training/generate.py:82
Method
postprocess
(self, model_outputs, response_key_token_id, end_key_token_id, return_full_text: bool = False)
training/generate.py:153
Method
preprocess
(self, instruction_text, **generate_kwargs)
training/generate.py:116
Function
preprocess_batch
(batch: Dict[str, List], tokenizer: AutoTokenizer, max_length: int)
training/trainer.py:80
Function
test_load_training_dataset
Make sure we can load the training dataset and it has records
test/test_trainer.py:8
Function
test_tokenizer
Make sure we can encode and decode with the tokenizer
test/test_trainer.py:3
Method
torch_call
(self, examples: List[Union[List[int], Any, Dict[str, Any]]])
training/trainer.py:49