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

Inference no copy #43

Merged
merged 6 commits into from
Feb 24, 2024
Merged

Inference no copy #43

merged 6 commits into from
Feb 24, 2024

Conversation

transcendingvictor
Copy link
Collaborator

Change to the inference.py module, where the pandas dataframe is created by a list comprehension of each of the rows of the logsprobs numpy array.

  • This is needed to see the display on huggingface in batches.
  • The the elements of the list comprehension are just references (not copies) to the numpy array.
  • The list object itself occupies does occupy, but it's relatively very small.

Copy link
Contributor

@jettjaniak jettjaniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Did you test it?

scripts/inference.py Outdated Show resolved Hide resolved
@transcendingvictor transcendingvictor marked this pull request as ready for review February 24, 2024 11:58
@transcendingvictor
Copy link
Collaborator Author

It was tested, indeed.

@transcendingvictor transcendingvictor merged commit 43b76f7 into main Feb 24, 2024
1 check passed
@transcendingvictor transcendingvictor deleted the inference-no-copy branch February 24, 2024 12:06
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.

2 participants