Skip to content

fix: torch_dtype deprecated warning on startup with recent transformers #111

@deveshbervar

Description

@deveshbervar

Problem

Running Sugar-AI locally produces this deprecation warning on startup:

torch_dtype is deprecated! Use dtype instead!

This appears in app/ai.py when loading the model.

Environment

  • Python 3.14.3
  • transformers latest (5.x)
  • Windows 11

Fix

Replace torch_dtype=torch.float16 with dtype=torch.float16 in app/ai.py.

Fix submitted in PR #109

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions