Instructions to use llmware/slim-nli-tool with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmware/slim-nli-tool with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("llmware/slim-nli-tool", dtype="auto") - llama-cpp-python
How to use llmware/slim-nli-tool with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="llmware/slim-nli-tool", filename="slim-nli.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use llmware/slim-nli-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-nli-tool # Run inference directly in the terminal: llama cli -hf llmware/slim-nli-tool
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf llmware/slim-nli-tool # Run inference directly in the terminal: llama cli -hf llmware/slim-nli-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-nli-tool # Run inference directly in the terminal: ./llama-cli -hf llmware/slim-nli-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-nli-tool # Run inference directly in the terminal: ./build/bin/llama-cli -hf llmware/slim-nli-tool
Use Docker
docker model run hf.co/llmware/slim-nli-tool
- LM Studio
- Jan
- Ollama
How to use llmware/slim-nli-tool with Ollama:
ollama run hf.co/llmware/slim-nli-tool
- Unsloth Studio
How to use llmware/slim-nli-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-nli-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-nli-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-nli-tool to start chatting
- Atomic Chat new
- Docker Model Runner
How to use llmware/slim-nli-tool with Docker Model Runner:
docker model run hf.co/llmware/slim-nli-tool
- Lemonade
How to use llmware/slim-nli-tool with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull llmware/slim-nli-tool
Run and chat with the model
lemonade run user.slim-nli-tool-{{QUANT_TAG}}List all available models
lemonade list
license: apache-2.0
Model Card for Model ID
slim-sentiment-tool is part of the SLIM ("Structured Language Instruction Model") model series, providing a set of small, specialized decoder-based LLMs, fine-tuned for function-calling.
slim-sentiment-tool is a 4_K_M quantized GGUF version of slim-sentiment-tool, providing a fast, small inference implementation.
Load in your favorite GGUF inference engine, or try with llmware as follows:
from llmware.models import ModelCatalog
sentiment_tool = ModelCatalog().load_model("llmware/slim-sentiment-tool")
response = sentiment_tool.function_call(text_sample, params=["sentiment"], function="classify")
Slim models can also be loaded even more simply as part of LLMfx calls:
from llmware.agents import LLMfx
llm_fx = LLMfx()
llm_fx.load_tool("sentiment")
response = llm_fx.sentiment(text)
Model Description
- Developed by: llmware
- Model type: GGUF
- Language(s) (NLP): English
- License: Apache 2.0
- Quantized from model: llmware/slim-sentiment (finetuned tiny llama)
Uses
The intended use of SLIM models is to re-imagine traditional 'hard-coded' classifiers through the use of function calls.
Example:
text = "The stock market declined yesterday as investors worried increasingly about the slowing economy."
model generation - {"sentiment": ["negative"]}
keys = "sentiment"
All of the SLIM models use a novel prompt instruction structured as follows:
"<human> " + text + "<classify> " + keys + "</classify>" + "/n<bot>: "
Model Card Contact
Darren Oberst & llmware team