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

Add files via upload #82

Closed
wants to merge 1 commit into from

Conversation

adityasingh-0803
Copy link

Screenshot 2024-10-27 215721
Screenshot 2024-10-27 215711
Screenshot 2024-10-27 215652

We wrote a Python script to calculate the perplexity of a sentence using the GPT-2 model from the Hugging Face Transformers library. The script imports necessary libraries, loads the model and tokenizer, and defines a function that tokenizes input text, computes the model's loss, and derives perplexity from that loss. We tested the function with an example sentence, outputting a perplexity value that indicates how predictable the model finds the text. This process helps evaluate the model's understanding of language based on its training.

We wrote a Python script to calculate the perplexity of a sentence using the GPT-2 model from the Hugging Face Transformers library. The script imports necessary libraries, loads the model and tokenizer, and defines a function that tokenizes input text, computes the model's loss, and derives perplexity from that loss. We tested the function with an example sentence, outputting a perplexity value that indicates how predictable the model finds the text. This process helps evaluate the model's understanding of language based on its training.
@adityasingh-0803
Copy link
Author

@tarun-aiplanet please check and verify

@tarun-aiplanet
Copy link
Member

This is isn't how the LLM support is added. Check #81

Check LLM folder. Furthermore, by Perplexity I mean perplexity.ai model using API support.

@tarun-aiplanet
Copy link
Member

I am closing this PR, as its irrelevant code addition.

@tarun-aiplanet tarun-aiplanet added the invalid This doesn't seem right label Oct 28, 2024
@adityasingh-0803
Copy link
Author

can we do it without api support

@adityasingh-0803
Copy link
Author

like genrating text without api support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants