Skip to content

Commit

Permalink
Added models for gpt4all.
Browse files Browse the repository at this point in the history
  • Loading branch information
3coins committed Nov 8, 2023
1 parent 61b9791 commit 804e9d2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/jupyter-ai-magics/jupyter_ai_magics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .embedding_providers import (
BedrockEmbeddingsProvider,
CohereEmbeddingsProvider,
GPT4AllEmbeddingsProvider,
HfHubEmbeddingsProvider,
OpenAIEmbeddingsProvider,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from langchain.embeddings import (
BedrockEmbeddings,
CohereEmbeddings,
GPT4AllEmbeddings,
HuggingFaceHubEmbeddings,
OpenAIEmbeddings,
)
Expand Down Expand Up @@ -103,3 +104,11 @@ class BedrockEmbeddingsProvider(BaseEmbeddingsProvider, BedrockEmbeddings):
model_id_key = "model_id"
pypi_package_deps = ["boto3"]
auth_strategy = AwsAuthStrategy()


class GPT4AllEmbeddingsProvider(BaseEmbeddingsProvider, GPT4AllEmbeddings):
id = "gpt4all"
name = "GPT4All Embeddings"
models = ["all-MiniLM-L6-v2-f16"]
model_id_key = "model_id"
pypi_package_deps = ["gpt4all"]
12 changes: 12 additions & 0 deletions packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,18 @@ def __init__(self, **kwargs):
"ggml-gpt4all-j-v1.3-groovy",
# this one needs llama backend and has licence restriction
"ggml-gpt4all-l13b-snoozy",
"mistral-7b-openorca.Q4_0",
"mistral-7b-instruct-v0.1.Q4_0",
"gpt4all-falcon-q4_0",
"wizardlm-13b-v1.2.Q4_0",
"nous-hermes-llama2-13b.Q4_0",
"gpt4all-13b-snoozy-q4_0",
"mpt-7b-chat-merges-q4_0",
"orca-mini-3b-gguf2-q4_0",
"replit-code-v1_5-3b-q4_0",
"starcoder-q4_0",
"rift-coder-v0-7b-q4_0",
"em_german_mistral_v01.Q4_0"
]
model_id_key = "model"
pypi_package_deps = ["gpt4all"]
Expand Down
1 change: 1 addition & 0 deletions packages/jupyter-ai-magics/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ amazon-bedrock-chat = "jupyter_ai_magics:BedrockChatProvider"
[project.entry-points."jupyter_ai.embeddings_model_providers"]
bedrock = "jupyter_ai_magics:BedrockEmbeddingsProvider"
cohere = "jupyter_ai_magics:CohereEmbeddingsProvider"
gpt4all = "jupyter_ai_magics:GPT4AllEmbeddingsProvider"
huggingface_hub = "jupyter_ai_magics:HfHubEmbeddingsProvider"
openai = "jupyter_ai_magics:OpenAIEmbeddingsProvider"

Expand Down

0 comments on commit 804e9d2

Please sign in to comment.