Skip to content

DirectoryTree/PrivacyFilterBinaries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Privacy Filter Binaries

Build binaries status Integration test binaries status

Prebuilt privacy-filter.cpp binaries for Linux, macOS, and Windows.

Installation

You may install the precompiled binaries and GGUF model using the following instructions.

Both are required to use the privacy-filter.cpp command line tool. The binary is the executable that runs the classification, while the model contains the data and parameters needed for the classification process.

Binary

Download the archive for your platform from the latest release:

curl -L -o privacy-filter.tar.gz \
  https://github.com/DirectoryTree/PrivacyFilterBinaries/releases/latest/download/privacy-filter-darwin-arm64.tar.gz

tar -xzf privacy-filter.tar.gz

Model

Download the GGUF model:

mkdir -p models

curl -L -o models/privacy-filter-f16.gguf \
  https://huggingface.co/LocalAI-io/privacy-filter-GGUF/resolve/main/privacy-filter-f16.gguf

Usage

Classify text from stdin:

echo 'Contact John Doe at jdoe@example.com from 555-0100.' \
  | ./privacy-filter-darwin-arm64/bin/privacy-filter --classify models/privacy-filter-f16.gguf 0.5

The final argument is the classification threshold. Only entities with a confidence score equal to or greater than the threshold will be returned.

Serve Mode

Use privacy-filter-serve to keep the model loaded and classify multiple requests through a single long-running process:

./privacy-filter-darwin-arm64/bin/privacy-filter-serve models/privacy-filter-f16.gguf

The process reads one JSON request per line from stdin and writes one JSON response per line to stdout:

{"id":"1","text":"Contact John Doe at jdoe@example.com.","threshold":0.5}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors