Python: hf sample and generator
Motivation and Context
Adds a parameter to the hugging face text completion class to supply the Pipeline, this allows more customization. Added a sample that shows how to setup quantization for HF models. Not ready to use because of differences in setup and hardware.
Closes: #6374
Description
Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone :smile:
Python 3.10 Test Coverage Report •
File Stmts Miss Cover Missing semantic_kernel/connectors/ai/hugging_face/services hf_text_completion.py 43 14 67% 92–93, 95, 121–144 TOTAL 6529 727 89%
Python 3.10 Unit Test Overview
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 1547 | 1 :zzz: | 0 :x: | 0 :fire: | 24.262s :stopwatch: |
@eavanvalkenburg, are you still working on this one? Or should we close it out?
@matthewbolanos still want to add this, just has not been a prio, it adds some additional capabilities to the connector as well as a new sample
Please re-open if/when we want to get this into main.