Instructions to use llmware/slim-sa-ner-tool with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmware/slim-sa-ner-tool with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("llmware/slim-sa-ner-tool", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use llmware/slim-sa-ner-tool with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf llmware/slim-sa-ner-tool # Run inference directly in the terminal: llama cli -hf llmware/slim-sa-ner-tool
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf llmware/slim-sa-ner-tool # Run inference directly in the terminal: llama cli -hf llmware/slim-sa-ner-tool
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf llmware/slim-sa-ner-tool # Run inference directly in the terminal: ./build/bin/llama cli -hf llmware/slim-sa-ner-tool
Use Docker
docker model run hf.co/llmware/slim-sa-ner-tool
- Llama new
- LM Studio
- Jan
- Ollama
How to use llmware/slim-sa-ner-tool with Ollama:
ollama run hf.co/llmware/slim-sa-ner-tool
- Unsloth Desktop
- Docker Model Runner
How to use llmware/slim-sa-ner-tool with Docker Model Runner:
docker model run hf.co/llmware/slim-sa-ner-tool
- Lemonade
How to use llmware/slim-sa-ner-tool with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull llmware/slim-sa-ner-tool
Run and chat with the model
lemonade run user.slim-sa-ner-tool-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,19 +2,21 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
|
| 5 |
-
# SLIM-
|
| 6 |
|
| 7 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 8 |
|
| 9 |
|
| 10 |
-
**slim-
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
To pull the model via API:
|
| 15 |
|
| 16 |
from huggingface_hub import snapshot_download
|
| 17 |
-
snapshot_download("llmware/slim-
|
| 18 |
|
| 19 |
|
| 20 |
Load in your favorite GGUF inference engine, or try with llmware as follows:
|
|
@@ -22,11 +24,11 @@ Load in your favorite GGUF inference engine, or try with llmware as follows:
|
|
| 22 |
from llmware.models import ModelCatalog
|
| 23 |
|
| 24 |
# to load the model and make a basic inference
|
| 25 |
-
model = ModelCatalog().load_model("slim-
|
| 26 |
response = model.function_call(text_sample)
|
| 27 |
|
| 28 |
# this one line will download the model and run a series of tests
|
| 29 |
-
ModelCatalog().tool_test_run("slim-
|
| 30 |
|
| 31 |
|
| 32 |
Slim models can also be loaded even more simply as part of a multi-model, multi-step LLMfx calls:
|
|
@@ -34,11 +36,11 @@ Slim models can also be loaded even more simply as part of a multi-model, multi-
|
|
| 34 |
from llmware.agents import LLMfx
|
| 35 |
|
| 36 |
llm_fx = LLMfx()
|
| 37 |
-
llm_fx.load_tool("
|
| 38 |
-
response = llm_fx.
|
| 39 |
|
| 40 |
|
| 41 |
-
Note: please review [**config.json**](https://huggingface.co/llmware/slim-
|
| 42 |
|
| 43 |
|
| 44 |
## Model Card Contact
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
|
| 5 |
+
# SLIM-SA-NER-3B-TOOL
|
| 6 |
|
| 7 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 8 |
|
| 9 |
|
| 10 |
+
**slim-sa-ner-3b-tool** is a 4_K_M quantized GGUF version of slim-sa-ner-3b, providing a small, fast inference implementation, optimized for multi-model concurrent deployment.
|
| 11 |
|
| 12 |
+
This model combines two of the most popular traditional classifier capabilities (sentiment analysis and named entity recognition) and re-images them as function calls on a small specialized decoder LLM, generating output in the form of a python dictionary with keys corresponding to sentiment and NER identifiers.
|
| 13 |
+
|
| 14 |
+
[**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.
|
| 15 |
|
| 16 |
To pull the model via API:
|
| 17 |
|
| 18 |
from huggingface_hub import snapshot_download
|
| 19 |
+
snapshot_download("llmware/slim-sa-ner-3b-tool", local_dir="/path/on/your/machine/", local_dir_use_symlinks=False)
|
| 20 |
|
| 21 |
|
| 22 |
Load in your favorite GGUF inference engine, or try with llmware as follows:
|
|
|
|
| 24 |
from llmware.models import ModelCatalog
|
| 25 |
|
| 26 |
# to load the model and make a basic inference
|
| 27 |
+
model = ModelCatalog().load_model("slim-sa-ner-3b-tool")
|
| 28 |
response = model.function_call(text_sample)
|
| 29 |
|
| 30 |
# this one line will download the model and run a series of tests
|
| 31 |
+
ModelCatalog().tool_test_run("slim-sa-ner-3b-tool", verbose=True)
|
| 32 |
|
| 33 |
|
| 34 |
Slim models can also be loaded even more simply as part of a multi-model, multi-step LLMfx calls:
|
|
|
|
| 36 |
from llmware.agents import LLMfx
|
| 37 |
|
| 38 |
llm_fx = LLMfx()
|
| 39 |
+
llm_fx.load_tool("sa-ner")
|
| 40 |
+
response = llm_fx.sa_ner(text)
|
| 41 |
|
| 42 |
|
| 43 |
+
Note: please review [**config.json**](https://huggingface.co/llmware/slim-sa-ner-3b-tool/blob/main/config.json) in the repository for prompt wrapping information, details on the model, and full test set.
|
| 44 |
|
| 45 |
|
| 46 |
## Model Card Contact
|