No project description provided
Project description
HELMET: Human Evaluated large Language Model Explainability Tool
Contents
- Installation helmet
- Configuration Details
- Features
- Install Helmet from source
- Deploy helmet-platform (local)
- License
Pypi Installation
pip install helmet
Overview
This package exists of two parts;
- A python package;
helmet
, which you can install in your Jupyter Notebook/Sagemaker/Colab - A webapp:
helmet-platform
, which deploys an API to save al the runs & projects and interacts with the frontend. A frontend should also be deployed.
Configuration files
Platform configuration
project_setup = {
# This should point to the NodeJS API
platform_url: "localhost:4000"
project_id: "<ID>"
}
Model configuration
model_checkpoint = "meta-llama/Meta-Llama-3-8B"
model_setup = {
"checkpoint": model_checkpoint,
# This can be enc/enc-dec/dec
"model_type": "dec",
# This should specify where the embeddings are stored
"embeddings": "model.embed_tokens",
}
Run configuration
run_config = {
# "cuda" & "cpu" are currently supported
"device": device,
}
Load/create project
Creating a project can be done by current the following python code in your jupyter notebook.
project_id = helmet.get_or_create_project("<platform url>", "<project name>", "text_generation")
This will give you back the ID of the project, that you can then use to load the model.
After you have configured the model, platform & device, you can start loading the model like this:
model = helmet.from_pretrained(project_setup, model_setup, run_config)
Features
- Load any causal model from Huggingface.
- Create a project for your experiment
- Run experimental prompts
Demo
A demo can be found at https://helmet.jeroennelen.nl
Install from source
To use helmet in one of the examples perform the following steps:
- Create venv with
python -m venv .venv
- Activate the venv with
source .venv/bin/activate
- Install HELMET from source (from git, when located in the home folder of helmet
pip install -e .
- Install jupyter notebook
pip install jupyterlab
To remove:
deactivate
jupyter-kernelspec uninstall venv
rm -r venv
Running webapp locally
For this, please check the README
in the webapp
Credits
Some inspiration has been drawn from a couple of other tools:
License
helmet
is distributed under the terms of the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file helmet-1.1.0.tar.gz
.
File metadata
- Download URL: helmet-1.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80c1d98712c90e94377223ef2bc6ebb22aa5aa3b16415d6250fc414d9b95e460 |
|
MD5 | 1cba0c9d10a687154462ec73275806fd |
|
BLAKE2b-256 | 404ca9c0f459832379de1241560903d96d77a5a2d78b565e9b4183eaed4f25de |
File details
Details for the file helmet-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: helmet-1.1.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ff8dea9c82d0aaf356c3c7b88cea075ba97e6c196b7bc74526d5f244545021d |
|
MD5 | cef28b4fff9783bce03b0c475dc36d5b |
|
BLAKE2b-256 | 4dc1d3f29030b3d7760e2b01a2e527ad961cf4d6082cf30f0608e0e876e99b6c |