Instructions to use llmware/slim-extract-tool with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmware/slim-extract-tool with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("llmware/slim-extract-tool", dtype="auto") - llama-cpp-python
How to use llmware/slim-extract-tool with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="llmware/slim-extract-tool", filename="slim-extract.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use llmware/slim-extract-tool with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf llmware/slim-extract-tool # Run inference directly in the terminal: llama-cli -hf llmware/slim-extract-tool
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf llmware/slim-extract-tool # Run inference directly in the terminal: llama-cli -hf llmware/slim-extract-tool
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf llmware/slim-extract-tool # Run inference directly in the terminal: ./llama-cli -hf llmware/slim-extract-tool
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf llmware/slim-extract-tool # Run inference directly in the terminal: ./build/bin/llama-cli -hf llmware/slim-extract-tool
Use Docker
docker model run hf.co/llmware/slim-extract-tool
- LM Studio
- Jan
- Ollama
How to use llmware/slim-extract-tool with Ollama:
ollama run hf.co/llmware/slim-extract-tool
- Unsloth Studio
How to use llmware/slim-extract-tool with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for llmware/slim-extract-tool to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for llmware/slim-extract-tool to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for llmware/slim-extract-tool to start chatting
- Docker Model Runner
How to use llmware/slim-extract-tool with Docker Model Runner:
docker model run hf.co/llmware/slim-extract-tool
- Lemonade
How to use llmware/slim-extract-tool with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull llmware/slim-extract-tool
Run and chat with the model
lemonade run user.slim-extract-tool-{{QUANT_TAG}}List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,26 +2,24 @@
|
|
| 2 |
license: cc-by-sa-4.0
|
| 3 |
---
|
| 4 |
|
| 5 |
-
# SLIM-
|
| 6 |
|
| 7 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 8 |
|
| 9 |
|
| 10 |
-
**slim-
|
| 11 |
|
| 12 |
-
This model
|
| 13 |
|
| 14 |
The intent of SLIMs is to forge a middle-ground between traditional encoder-based classifiers and open-ended API-based LLMs.
|
| 15 |
|
| 16 |
-
The size of the self-contained GGUF model binary is 1.71 GB, which is small enough to run locally on a CPU, and yet which comparables favorably with the use of two traditional FP32 versions of Roberta-Large for NER (1.42GB) and BERT for Sentiment Analysis (440 MB), while offering greater potential capacity depth with 2.7B parameters, and without the requirement of Pytorch and other external dependencies.
|
| 17 |
|
| 18 |
-
|
| 19 |
-
[**slim-sa-ner-3b**](https://huggingface.co/llmware/slim-sa-ner-3b) is part of the SLIM ("**S**tructured **L**anguage **I**nstruction **M**odel") series, providing a set of small, specialized decoder-based LLMs, fine-tuned for function-calling.
|
| 20 |
|
| 21 |
To pull the model via API:
|
| 22 |
|
| 23 |
from huggingface_hub import snapshot_download
|
| 24 |
-
snapshot_download("llmware/slim-
|
| 25 |
|
| 26 |
|
| 27 |
Load in your favorite GGUF inference engine, or try with llmware as follows:
|
|
@@ -29,14 +27,14 @@ Load in your favorite GGUF inference engine, or try with llmware as follows:
|
|
| 29 |
from llmware.models import ModelCatalog
|
| 30 |
|
| 31 |
# to load the model and make a basic inference
|
| 32 |
-
model = ModelCatalog().load_model("slim-
|
| 33 |
response = model.function_call(text_sample)
|
| 34 |
|
| 35 |
# this one line will download the model and run a series of tests
|
| 36 |
-
ModelCatalog().tool_test_run("slim-
|
| 37 |
|
| 38 |
|
| 39 |
-
Note: please review [**config.json**](https://huggingface.co/llmware/slim-
|
| 40 |
|
| 41 |
|
| 42 |
## Model Card Contact
|
|
|
|
| 2 |
license: cc-by-sa-4.0
|
| 3 |
---
|
| 4 |
|
| 5 |
+
# SLIM-EXTRACT-TOOL
|
| 6 |
|
| 7 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 8 |
|
| 9 |
|
| 10 |
+
**slim-extract-tool** is a 4_K_M quantized GGUF version of slim-extract, providing a small, fast inference implementation, optimized for multi-model concurrent deployment.
|
| 11 |
|
| 12 |
+
This model has been fine-tuned to implement a general-purpose extraction function that takes a custom key as input parameter, and generates a python dictionary consisting of that custom key with the value consisting of a list of the values associated with that key in the text.
|
| 13 |
|
| 14 |
The intent of SLIMs is to forge a middle-ground between traditional encoder-based classifiers and open-ended API-based LLMs.
|
| 15 |
|
|
|
|
| 16 |
|
| 17 |
+
[**slim-extract**](https://huggingface.co/llmware/slim-extract) is part of the SLIM ("**S**tructured **L**anguage **I**nstruction **M**odel") series, providing a set of small, specialized decoder-based LLMs, fine-tuned for function-calling.
|
|
|
|
| 18 |
|
| 19 |
To pull the model via API:
|
| 20 |
|
| 21 |
from huggingface_hub import snapshot_download
|
| 22 |
+
snapshot_download("llmware/slim-extract-tool", local_dir="/path/on/your/machine/", local_dir_use_symlinks=False)
|
| 23 |
|
| 24 |
|
| 25 |
Load in your favorite GGUF inference engine, or try with llmware as follows:
|
|
|
|
| 27 |
from llmware.models import ModelCatalog
|
| 28 |
|
| 29 |
# to load the model and make a basic inference
|
| 30 |
+
model = ModelCatalog().load_model("slim-extract-tool")
|
| 31 |
response = model.function_call(text_sample)
|
| 32 |
|
| 33 |
# this one line will download the model and run a series of tests
|
| 34 |
+
ModelCatalog().tool_test_run("slim-extract-tool", verbose=True)
|
| 35 |
|
| 36 |
|
| 37 |
+
Note: please review [**config.json**](https://huggingface.co/llmware/slim-extract-tool/blob/main/config.json) in the repository for prompt wrapping information, details on the model, and full test set.
|
| 38 |
|
| 39 |
|
| 40 |
## Model Card Contact
|