-
Notifications
You must be signed in to change notification settings - Fork 265
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
Draft to add text-generation parameters #1393
Conversation
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.
Looking nice!
- [google/gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it): A text-generation model trained to follow instructions. | ||
- [meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct): Very powerful text generation model trained to follow instructions. | ||
- [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct): Small yet powerful text generation model. | ||
- [AI-MO/NuminaMath-7B-TIR](https://huggingface.co/AI-MO/NuminaMath-7B-TIR): A very powerful model that can solve mathematical problems. |
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.
As discussed in a follow-up, we should prevent having frozen models here
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.
yes, related thread: #1384 (comment)
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.
return response.json() | ||
|
||
output = query({ | ||
"inputs": "Can you please let us know more details about your ", |
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.
To update to conversational API before release
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.
that was a mistake on my side. Fixed in 486e809
…ntence similarity) (#1394) * add fill mask * add summarization * add question answering * Table question answering * handle array output * Add sentence similarity * text classification (almost) * better with an enum * Add mask token * capitalize * remove sentence-similarity * Update docs/api-inference/tasks/table_question_answering.md Co-authored-by: Omar Sanseviero <[email protected]> --------- Co-authored-by: Omar Sanseviero <[email protected]>
* Add draft of docs structure * Add index page * Prepare overview and rate limits * Manage redirects * Clean up * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * Apply suggestions from review * Add additional headers * Apply suggestions from code review Co-authored-by: Lucain <[email protected]> * Incorporate reviewer's feedback * First draft for text-to-image, image-to-image + generate script (#1384) * First draft for text-to-image * add correct code snippets * Update docs/api-inference/tasks/text-to-image.md Co-authored-by: Omar Sanseviero <[email protected]> * better table? * Generate tasks pages from script (#1386) * init project * first script to generate task pages * commit generated content * generate payload table as well * so undecisive * hey * better ? * Add image-to-image page * template for snippets section + few things * few things * Update scripts/api-inference/templates/specs_headers.handlebars Co-authored-by: Omar Sanseviero <[email protected]> * Update scripts/api-inference/templates/specs_headers.handlebars Co-authored-by: Omar Sanseviero <[email protected]> * generate * fetch inference status --------- Co-authored-by: Omar Sanseviero <[email protected]> * Add getting started * Add draft of docs structure * Add index page * Prepare overview and rate limits * Manage redirects * Clean up * Apply suggestions from review * Apply suggestions from code review Co-authored-by: Pedro Cuenca <[email protected]> * Add additional headers * Apply suggestions from code review Co-authored-by: Lucain <[email protected]> * Incorporate reviewer's feedback * First draft for text-to-image, image-to-image + generate script (#1384) * First draft for text-to-image * add correct code snippets * Update docs/api-inference/tasks/text-to-image.md Co-authored-by: Omar Sanseviero <[email protected]> * better table? * Generate tasks pages from script (#1386) * init project * first script to generate task pages * commit generated content * generate payload table as well * so undecisive * hey * better ? * Add image-to-image page * template for snippets section + few things * few things * Update scripts/api-inference/templates/specs_headers.handlebars Co-authored-by: Omar Sanseviero <[email protected]> * Update scripts/api-inference/templates/specs_headers.handlebars Co-authored-by: Omar Sanseviero <[email protected]> * generate * fetch inference status --------- Co-authored-by: Omar Sanseviero <[email protected]> * Add getting started * Update docs/api-inference/getting_started.md Co-authored-by: Lucain <[email protected]> * Draft to add text-generation parameters (#1393) * first draft to add text-generation parameters * headers * more structure * add chat-completion * better handling of arrays * better handling of parameters * Add new tasks pages (fill mask, summarization, question answering, sentence similarity) (#1394) * add fill mask * add summarization * add question answering * Table question answering * handle array output * Add sentence similarity * text classification (almost) * better with an enum * Add mask token * capitalize * remove sentence-similarity * Update docs/api-inference/tasks/table_question_answering.md Co-authored-by: Omar Sanseviero <[email protected]> --------- Co-authored-by: Omar Sanseviero <[email protected]> * mention chat completion in text generation docs * fix chat completion snippets --------- Co-authored-by: Omar Sanseviero <[email protected]> * Filter out frozen models from API docs for tasks (#1396) * Filter out frozen models * use placeholder * New api docs suggestions (#1397) * show as diff * reorder toctree * wording update * diff * Add comment header on each task page (#1400) * Add comment header on each task page * add huggingface.co/api/tasks * Add even more tasks: token classification, translation and zero shot classification (#1398) * Add token classification * add translation task * add zero shot classification * more parameters * More tasks more tasks more tasks! (#1399) * add ASR * fix early stopping parameter * regenrate * add audio_classification * Image classification * Object detection * image segementation * unknown when we don't know * gen * feature extraction * update * regenerate * pull from main * coding style * Update _redirects.yml * Rename all tasks '_' to '-' (#1405) * Rename all tasks '_' to '-' * also for other urls * Update docs/api-inference/index.md Co-authored-by: Victor Muštar <[email protected]> * Apply feedback for "new_api_docs" (#1408) * Update getting started examples * Move snippets above specification * custom link for finegrained token * Fixes new docs (#1413) * Misc changes * Wrap up * Apply suggestions from code review * generate * Add todos to avoid forgetting about them --------- Co-authored-by: Lucain <[email protected]> Co-authored-by: Wauplin <[email protected]> --------- Co-authored-by: Pedro Cuenca <[email protected]> Co-authored-by: Lucain <[email protected]> Co-authored-by: Wauplin <[email protected]> Co-authored-by: Victor Muštar <[email protected]>
This PR adds pages for
text-generation
andchat-completion
pages. Thegenerate.ts
code is getting uglier and uglier with all the cases to handle but hopefully we are seeing the end of it. I expect those two tasks to be the most difficult ones in term of complexity (:crossed_fingers:).@osanseviero I'd say most of the PR is now reviewable and especially the two markdown pages. However, content is still a bit empty given that parameters are rarely documented in the specs. We will have to fix this in a separate PR in huggingface.js. I do think we shouldn't wait for specs update to merge this PR.