Reusable native privacy-filter serving runtime.
build/1 loads checkpoint-local config, weights, label info, and model
parameters once. run/3 tokenizes input text, executes the native model, and
converts privacy-filter BIOES logits into normal Obscura analyzer results.
Summary
Types
@type t() :: %Obscura.PrivacyFilter.Serving{ backend: term(), backend_metadata: term(), checkpoint: term(), config: term(), decoder: term(), discard_overlapping_spans: term(), dtypes: term(), label_info: term(), label_map: term(), layout: term(), logprob_conversion: term(), min_span_logprob: term(), model_fun: term(), n_ctx: term(), pad_windows: term(), params: term(), sequence_length_bucket_threshold: term(), sequence_length_buckets: term(), trim_span_whitespace: term(), viterbi_biases: term(), viterbi_calibration: term(), weights: term() }
Functions
@spec postprocess(t(), map(), Nx.Tensor.t(), keyword()) :: {:ok, [Obscura.Analyzer.Result.t()]} | {:error, term()}
@spec run(t(), String.t(), keyword()) :: {:ok, [Obscura.Analyzer.Result.t()]} | {:error, term()}