Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ make lint # ruff check .

For local vLLM inference (NVIDIA GPU, CUDA 12.8, ≥ 24 GB VRAM):

```bash
uv sync --extra vllm
```

vLLM is an optional extra so the base install resolves on macOS / non-CUDA hosts. If you don't use `uv`:

```bash
uv pip install vllm --extra-index-url https://download.pytorch.org/whl/cu128
```
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ dependencies = [
"transformers>=4.40.0",
"sentence-transformers>=5.2.3",
"torch>=2.10.0",
"vllm==0.17.0",
"openai>=2.24.0",
"anthropic>=0.75.0",
"google-genai>=1.0.0",
"pyarrow>=16.0.0",
]

[project.optional-dependencies]
vllm = ["vllm==0.17.0"]

[tool.pytest.ini_options]
pythonpath = ["."]
19 changes: 12 additions & 7 deletions sob/providers/anthropic_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,20 @@ def _infer_one(
candidate = None
input_tokens = output_tokens = 0

# Opus 4.7 deprecated temperature/top_p/top_k — passing any of them
# returns a 400. See https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7
kwargs: dict = dict(
model=config.model_id,
max_tokens=config.max_tokens,
system=SYSTEM_PROMPT,
messages=[{"role": "user", "content": user_msg}],
)
if "opus-4-7" not in config.model_id:
kwargs["temperature"] = config.temperature

for attempt in range(config.max_retries):
try:
response = client.messages.create(
model=config.model_id,
max_tokens=config.max_tokens,
system=SYSTEM_PROMPT,
messages=[{"role": "user", "content": user_msg}],
temperature=config.temperature,
)
response = client.messages.create(**kwargs)
# Anthropic returns a list of content blocks; text lives on the
# first one (TextBlock) for plain JSON tasks.
raw = ""
Expand Down
7 changes: 6 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.