Downloads · 30 days
213
9% of all-time downloads
llmware/slim-sa-ner-tool
slim-sa-ner-tool is a machine learning model from llmware. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-sa-4.0.
slim-sa-ner-tool is a 4KM quantized GGUF version of slim-sa-ner, providing a small, fast inference implementation, optimized for multi-model concurrent deployment.
Downloads · 30 days
213
9% of all-time downloads
All-time downloads
2.3K
Public
Repo size
1.7 GB
Likes
4
Public
Click a slice to open those files.
.gguf1.7 GB · 100%
From the Hugging Face model README
slim-sa-ner-tool is a 4_K_M quantized GGUF version of slim-sa-ner, providing a small, fast inference implementation, optimized for multi-model concurrent deployment.
slim-sa-ner combines two of the most popular traditional classifier functions (Sentiment Analysis and Named Entity Recognition), and reimagines them as function calls on a specialized decoder-based LLM, generating output consisting of a python dictionary with keys corresponding to sentiment, and NER identifiers, such as people, organization, and place, e.g.:
{'sentiment': ['positive'], people': ['..'], 'organization': ['..'],
'place': ['..]}
This 3B parameter 'combo' model is designed to illustrate the potential power of using function calls on small, specialized models to enable a single model architecture to combine the capabilities of what were traditionally two separate model architectures on an encoder.
The intent of SLIMs is to forge a middle-ground between traditional encoder-based classifiers and open-ended API-based LLMs, providing an intuitive, flexible natural language response, without complex prompting, and with improved generalization and ability to fine-tune to a specific domain use case.
To pull the model via API:
from huggingface_hub import snapshot_download
snapshot_download("llmware/slim-sa-ner-tool", local_dir="/path/on/your/machine/", local_dir_use_symlinks=False)
Load in your favorite GGUF inference engine, or try with llmware as follows:
from llmware.models import ModelCatalog
# to load the model and make a basic inference
model = ModelCatalog().load_model("slim-sa-ner-tool")
response = model.function_call(text_sample)
# this one line will download the model and run a series of tests
ModelCatalog().tool_test_run("slim-sa-ner-tool", verbose=True)
Note: please review config.json in the repository for prompt wrapping information, details on the model, and full test set.
Darren Oberst & llmware team