-
Notifications
You must be signed in to change notification settings - Fork 5
adding trust_remote_code and batch_size #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I added trust_remote_code to the be default with True Also added the batch_size argument to be 32 as default option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this PR! Almost good to go. Could you "run pre-commit run --all-files" in the virtual environment (after running make install)? That should automatically fix the styling issues.
parser.add_argument( | ||
"--trust-remote-code", | ||
type=bool, | ||
default=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think False is a safer default to choose here, could you update to that?
@@ -18,7 +18,7 @@ | |||
|
|||
|
|||
def train_model( | |||
model_name: str, train_txt: list[str], train_vec: np.ndarray, device: str = "cpu", vocab_size: int | None = None | |||
model_name: str, train_txt: list[str], train_vec: np.ndarray, device: str = "cpu",batch_size: int= 32, vocab_size: int | None = None,trust_remote_code: bool=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small styling issue:
model_name: str, train_txt: list[str], train_vec: np.ndarray, device: str = "cpu",batch_size: int= 32, vocab_size: int | None = None,trust_remote_code: bool=True | |
model_name: str, train_txt: list[str], train_vec: np.ndarray, device: str = "cpu", batch_size: int= 32, vocab_size: int | None = None, trust_remote_code: bool=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also on a couple of other lines, see general PR comment.
parser.add_argument( | ||
"--batch-size", | ||
type=int, | ||
default=32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This default doesn't match the default in https://github.com/MinishLab/tokenlearn/blob/main/tokenlearn/pretrain.py#L127, could you change to 256 so they match? Same for the default in the train_model function
I added trust_remote_code to the be default with True Also added the batch_size argument to be 32 as default option