Setup
Install the Baseten CLI and sign in, then install the Pythonrequests library.
Install and sign in to BasetenFor other platforms or a specific version, see the Baseten CLI install reference.
- macOS or Linux
- Windows
Terminal
Install requests
- 1 Small
- 2
fred-baseten/zerank-1-small-seq is a 1.7B-parameter decoder model with up to 32K context.This preset builds a sequence-classification checkpoint with FP8 quantization on one L4.Then create a file named You should see output similar to:For batch scoring at higher throughput, use the Baseten Performance Client.The
Hardware
L4:4x16
Engine
TRT-LLM
Context
32K
Write the config
Create and move into the project directory:config.yaml and paste the following:config.yaml
Key parameters
Baseten Embeddings Inference (BEI) reads these fields from thetrt_llm block. Each one shapes how the engine is built and served:Deploy
Push the config to Baseten with the Baseten CLI, or with the Truss CLI if you prefer it:baseten model push prints your model ID (abc1d2ef in the example). The examples below use it wherever you see {model_id}, and read your API key from the BASETEN_API_KEY environment variable.Call the model
Your deployment exposes a cross-encoder scoring endpoint at/predict.Now call your deployment to score candidates:- Python
- cURL
main.py
/predict route accepts inputs containing formatted prompts, not a query and texts object. Request raw_scores: true and use the pinned checkpoint’s tokenizer and scoring instructions: Zerank 1 Small checkpoint.Next steps
Call your model
Endpoint anatomy, authentication, and sync versus async inference
Autoscaling
Scale replicas with traffic, including scale to zero