chatbot_kernel
A Jupyter kernel to use Jupyter as a chat window, running downloaded LLMs locally.
Installation
This kernel package can be install from PyPI
$ pip install chatbot_kernel
Once the package installed, the kernel spec can be installed to home directory by command:
$ python -m chatbot_kernel install --user
If you are using virtualenv, do
$ python -m chatbot_kernel install --sys-prefix
instead.
If you install the package to a virtual environment, you may need to set up JUPYTER_PATH=/path/to/venv/share/jupyter:$JUPYTER_PATH so that jupyter can find the kernel
Usage
A few magics are available in the kernel:
%help: Print help messages%config: Set advanced configuration. See more in%config help%load: Load a pretrained LLM%hf_home: Set the path to find downloaded LLMs, similar to setHF_HOMEenvironment variable%model_list: Show the available LLMs%new_chat: Clean up the chat history
Before start chatting, you need to at least download a model from HuggingFace. For example, huggingface-cli download meta-llama/Meta-Llama-3-8B-Instruct.
Once models are downloaded, launch a jupyter notebook/lab and execute %load <model> and start chatting. Here is an example:
%load meta-llama/Meta-Llama-3-8B-Instruct
hi
who are you
Caveat
Currently, the kernel use the AutoModelForCausalLM and it is not supported by all models.
A few models have been tested:
meta-llama/Meta-Llama-3-8B-Instructmistralai/Mistral-7B-Instruct-v0.3: needssentencepiecedependencyunsloth/llama-3-8b-Instruct-bnb-4bit: needsbitsandbytesdependency
Metadata
Release files for chatbot-kernel 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chatbot_kernel-0.4.1.tar.gz | 9.8 kB | Without provenance | Details for chatbot_kernel-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chatbot_kernel-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for chatbot_kernel-0.4.1-py3-none-any.whl |
Total release size: 19.6 kB
Release files / chatbot_kernel-0.4.1.tar.gz
| Download URL | chatbot_kernel-0.4.1.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4477772b2acfc77617e7ed9110da4b5f12262e9adcc5610e93ef80b5deba0ba
|
|
BLAKE2b-256 checksum How to use checksums |
2512d83919bf830dab0a017fc5fce787ae38fb10e70cb1a606d7faf5678874aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / chatbot_kernel-0.4.1-py3-none-any.whl
| Download URL | chatbot_kernel-0.4.1-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83b8d059ec3ac98629aaa9f8f5266591a3911f835d1c89702fe1eb37bb17f99f
|
|
BLAKE2b-256 checksum How to use checksums |
34a772605eba49b91ef6b98f562cf10a7b0045e8bf2ce60214758980f68f983a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Security for chatbot-kernel 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.