mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### Motivation and Context This PR introduces native python support for Hugging Face models that can: complete text, generate new text, summarize, and that generate embeddings. Currently only supports downloading the models locally from the HF model hub. Future plans include supporting the HF inference API as well. ### Description - Added 2 services: `hf_text_completion` and `hf_text_embedding` - `hf_text_completion` supports the following tasks: _text-generation_, _text2text-generation_, and _summarization_ - `hf_text_embedding` supports any model supported by the sentence-transformers pip package - Added dependencies: pytorch, transformers, sentence-transformers to `requirements.txt` and `poetry.lock` - fixed typo: `get_embedding_service_service_id` -> `get_embedding_service_id` - Added a number of integration tests for supported HF models
35 lines
719 B
TOML
35 lines
719 B
TOML
[tool.poetry]
|
|
name = "semantic-kernel"
|
|
version = "0.2.4.dev"
|
|
description = ""
|
|
authors = ["Microsoft <[email protected]>"]
|
|
readme = "README.md"
|
|
packages = [{include = "semantic_kernel"}]
|
|
|
|
[tool.poetry.dependencies]
|
|
python = "^3.8"
|
|
numpy = "^1.24.2"
|
|
openai = "^0.27.0"
|
|
aiofiles = "^23.1.0"
|
|
transformers = "^4.28.1"
|
|
torch = "^2.0.0"
|
|
sentence-transformers = "^2.2.2"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
pre-commit = "^2.21.0"
|
|
black = {version = "^23.1.0", allow-prereleases = true}
|
|
ipykernel = "^6.21.1"
|
|
pytest = "7.2.0"
|
|
ruff = "^0.0.257"
|
|
pytest-asyncio = "^0.21.0"
|
|
|
|
[tool.isort]
|
|
profile = "black"
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
|
|
[build-system]
|
|
requires = ["poetry-core"]
|
|
build-backend = "poetry.core.masonry.api"
|