Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rajveer43
Copy link

@rajveer43 rajveer43 commented Sep 28, 2023

Fixes #10

@timlacroix
Copy link
Contributor

Thanks for the docs ! @alexandresablayrolles will review some time next week.

@rajveer43
Copy link
Author

Submit the approval with the changes

I do not see any review there! Do Any change required?

@rajveer43
Copy link
Author

@Sabersaber86 I do not see any reviews over there.

@rajveer43
Copy link
Author

@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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

documentation is required
2 participants