Skip to content

Add precision parameter to download_from_hf#362

Merged
HenryNdubuaku merged 1 commit intomainfrom
download_with_precision
Feb 17, 2026
Merged

Add precision parameter to download_from_hf#362
HenryNdubuaku merged 1 commit intomainfrom
download_with_precision

Conversation

@jakmro
Copy link
Copy Markdown
Collaborator

@jakmro jakmro commented Feb 17, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 17, 2026 01:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a precision parameter to the download_from_hf function to enable downloading pre-converted models with specific quantization precision (INT4, INT8, or FP16) from the Cactus-Compute HuggingFace organization. The PR also includes organization name capitalization fixes and a refactoring of the cmd_test function to simplify model downloading logic.

Changes:

  • Added precision parameter to download_from_hf function to construct precision-specific zip filenames
  • Updated organization name from "cactus-compute" to "Cactus-Compute" across docstrings and help text
  • Refactored cmd_test function to simplify model downloading with a more concise loop structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +864 to +881
if getattr(args, 'reconvert', False):
for model_id in [
getattr(args, 'model', 'LiquidAI/LFM2-VL-450M'),
getattr(args, 'transcribe_model', 'UsefulSensors/moonshine-base'),
getattr(args, 'vad_model', 'snakers4/silero-vad')
]:
class DownloadArgs:
pass
dl_args = DownloadArgs()
dl_args.model_id = model_id
dl_args.reconvert = True
if args.precision:
dl_args.precision = args.precision
if args.token:
dl_args.token = args.token

if cmd_download(dl_args) != 0:
return 1
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential behavior change: The old code would reconvert models when either precision OR reconvert flags were set (line 863 in old code: 'if precision or reconvert'). The new code only reconverts when the reconvert flag is set. This means that specifying --precision alone will no longer trigger model reconversion. If this behavior change is intentional, consider documenting it. If not, the condition should be 'if getattr(args, 'reconvert', False) or getattr(args, 'precision', None):'.

Copilot uses AI. Check for mistakes.
@HenryNdubuaku HenryNdubuaku merged commit 815176e into main Feb 17, 2026
7 of 8 checks passed
ncylich pushed a commit that referenced this pull request Feb 24, 2026
cattermelon1234 pushed a commit to cattermelon1234/cactus that referenced this pull request Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants