-
Notifications
You must be signed in to change notification settings - Fork 773
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
Addition docs adhering PEP257 and PEP8 #11
base: main
Are you sure you want to change the base?
Conversation
Thanks for the docs ! @alexandresablayrolles will review some time next week. |
I do not see any review there! Do Any change required? |
@Sabersaber86 I do not see any reviews over there. |
@alexandresablayrolles please review this |
@@ -21,6 +34,22 @@ def sample_top_p(probs: torch.Tensor, p: float): | |||
|
|||
|
|||
def sample(logits: torch.Tensor, temperature: float, top_p: float): | |||
""" | |||
Sample from the softmax distribution of logits with optional temperature and top-p filtering. |
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.
tempeatures / top-p aren't optional ?
model (Transformer): The Transformer model. | ||
tokenizer (Tokenizer): The tokenizer for encoding and decoding text. | ||
max_tokens (int): The maximum number of tokens to generate. | ||
chunk_size (int, optional): The size of chunks for encoding prompts. |
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.
should fix typing into Optional[int]
l2 (List[torch.Tensor]): The second list of tensors. | ||
|
||
Returns: | ||
List[torch.Tensor]: A new list containing elements interleaved from l1 and l2. |
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.
maybe clarify what interleaving means with an example ?
Fixes #10