Skip to main content

Setup

Install the Baseten CLI and sign in, then install the Python requests library.
Install and sign in to Baseten
Terminal
For other platforms or a specific version, see the Baseten CLI install reference.
Install requests
To install without Homebrew, see the Baseten CLI install reference. Pick the model you want to deploy. Each tab is a self-contained recipe.
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.

Hardware

L4:4x16

Engine

TRT-LLM

Context

32K

Write the config

Create and move into the project directory:
Then create a file named config.yaml and paste the following:
config.yaml

Key parameters

Baseten Embeddings Inference (BEI) reads these fields from the trt_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:
You should see output similar to:
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:
main.py
For batch scoring at higher throughput, use the Baseten Performance Client.The /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