An AI-driven library for generating content using HuggingFace and LMStudio models.
Project description
Run
make sure to have the following 3 files :
hf_models.json
[
{
"id" : 1,
"name" : "Mistral v0.2 ( HuggingFace )",
"type" : "HUGGINGFACE",
"kwargs" : {
"api_url": "https://api-inference.huggingface.co/models",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
"model_huggingface_id": "mistralai/Mistral-7B-Instruct-v0.2",
"default_parameters": {
"max_length": -1,
"max_new_tokens": 250,
"temperature": 1e-8,
"use_cache": true,
"wait_for_model": true
}
},
"preset" : 1
},
{
"id" : 2,
"name" : "Mistral v0.3 ( HuggingFace )",
"type" : "HUGGINGFACE",
"kwargs" : {
"api_url": "https://api-inference.huggingface.co/models",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
"model_huggingface_id": "mistralai/Mistral-7B-Instruct-v0.3",
"default_parameters": {
"max_length": -1,
"max_new_tokens": 250,
"temperature": 1e-8,
"use_cache": true,
"wait_for_model": true
}
},
"preset" : 1
},
{
"id" : 3,
"name" : "Phi 3 mini ( HuggingFace )",
"type" : "HUGGINGFACE",
"kwargs" : {
"api_url": "https://api-inference.huggingface.co/models",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
"model_huggingface_id": "microsoft/Phi-3-mini-4k-instruct",
"default_parameters": {
"max_length": -1,
"max_new_tokens": 250,
"temperature": 1e-8,
"use_cache": true,
"wait_for_model": true
}
},
"preset" : 2
}
]
presets.json
[
{
"id" : 1,
"name" : "Mistral Instruct",
"input_prefix" : "[INST]",
"input_suffix" : "[/INST]",
"antiprompt" : "[INST]",
"pre_prompt" : "",
"pre_prompt_prefix" : "",
"pre_prompt_suffix" : ""
},
{
"id" : 2,
"name" : "Phi 3",
"input_prefix" : "<|user|>\n",
"input_suffix" : "<|end|>\n<|assistant|>\n",
"antiprompt" : "\"<|end|>\", \"<|assistant|>\"",
"pre_prompt" : "",
"pre_prompt_prefix" : "<|end|>\n",
"pre_prompt_suffix" : "<|system|>\n"
}
]
tokens.json: More tokens mean more reliability and fault tolerence, in my case I used 10 HuggingFace tokens.
[
{
"id": 1,
"name": "First",
"value": "A HuggingFace api token"
},
{
"id": 2,
"name": "Second",
"value": "Another token just to make sure the requests don't fail"
},
{
"id": 3,
"name": "Third",
"value": "a third token as a backup"
}
... Add more as needed
]
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
echolib-0.2.0.tar.gz
(13.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
echolib-0.2.0-py3-none-any.whl
(16.1 kB
view details)
File details
Details for the file echolib-0.2.0.tar.gz.
File metadata
- Download URL: echolib-0.2.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33bc4b2db68cd6670b55ce649fc7d7baafca39be9f31041e8bfeca119af2181b
|
|
| MD5 |
04cce3dc639ae666b083f37b5c29d5e8
|
|
| BLAKE2b-256 |
46a811fdfa11f5cb96d1bc66676ca057c43ad819fc2aaf9f1794e550c993e942
|
File details
Details for the file echolib-0.2.0-py3-none-any.whl.
File metadata
- Download URL: echolib-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e937428b2769adeb59e7cc37b243d7ae43614af14534d525f9f6c17a373244e1
|
|
| MD5 |
21a6fc0c063f6bf85c2f5ee3cf3db495
|
|
| BLAKE2b-256 |
e71e96f55c388be41b86f61b343a36309244da2e505f0a6a5490dd1f8a154624
|