Skip to content

[Feature] Unsloth/ Whisper/Large-v3 - S3 Bucket connection #4539

Closed

Description

@Androidmedaa

Hi,

I’m currently using Unsloth Studio to fine-tune unsloth/ Whisper Large v3, and I have a question regarding dataset ingestion. My dataset consists of audio files stored privately on AWS S3 along with their corresponding transcriptions. I’d like to know whether Unsloth Studio supports direct integration with S3 (e.g., via bucket paths, IAM roles, or signed URLs) during the dataset upload step. At the moment, I’m unsure if there is a built-in way to connect an S3 bucket or if all data must first be downloaded locally to the instance. Could you clarify if this feature exists, is planned, or if there is a recommended workaround for securely using private S3-hosted audio datasets within Unsloth Studio?

Thank you for helping..

Activity

  1. added
    feature request
    on Mar 23, 2026
  2. added
    help wanted
    on Mar 24, 2026
  3. Huuffy commented on Mar 29, 2026

    @Huuffy

    Hi @Androidmedaa,

    To answer your questions:

    1. Does this feature currently exist?

    Currently, direct S3 integration is not yet built into the Unsloth Studio UI. The Studio currently supports:

    • Hugging Face Hub: Loading public/private datasets via HF tokens.
    • Local Uploads: Direct file uploads (JSON, CSV, PDF, etc.).

    2. Recommended Python Workaround

    Since Unsloth is built on top of the Hugging Face datasets ecosystem, you can bridge the gap using s3fs. This allows you to stream data directly from your private bucket without a full local download.

    Here is a snippet to get you started:

    import s3fs
    from datasets import load_dataset
    from unsloth import FastWhisperModel
    
    # 1. Setup S3 connection
    # Ensure your environment has AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set
    fs = s3fs.S3FileSystem()
    
    # 2. Load your metadata/manifest directly from S3
    # Assumes your CSV contains S3 paths to the actual audio files
    dataset = load_dataset("csv", data_files="s3://your-bucket-name/metadata.csv")
    
    # 3. Mapping function to fetch audio bytes on-the-fly
    def map_audio_from_s3(batch):
        # This fetches the specific audio file from S3 during the mapping/training process
        with fs.open(batch["audio_s3_path"], "rb") as f:
            batch["audio"] = {"array": f.read(), "sampling_rate": 16000}
        return batch
    
    dataset = dataset.map(map_audio_from_s3)
  4. Huuffy commented on Mar 29, 2026

    @Huuffy

    Hi @danielhanchen, @hiyouga, and @Datta0 - I would like to officially volunteer to implement this feature.

    I have extensive experience working with AWS S3 and cloud-native architectures. My proposed implementation would focus on:

    • Secure Credential Handling: Developing a workflow that allows users to select S3 as a source and securely input credentials (or use IAM roles/session tokens). These would be managed via .env or temporary environment variables to maintain strict confidentiality and follow security best practices.
    • Native Ingestion: Adding a dedicated S3 connector to the backend logic. This will enable the same high-performance "streaming" capability used for Hugging Face datasets, but natively for private S3 buckets within the Unsloth environment.

    I believe this would be a high-value addition for enterprise users and anyone handling private datasets. Please let me know if I should proceed with a Pull Request or if you have specific architectural preferences I should follow!

  5. Androidmedaa commented on Apr 5, 2026

    @Androidmedaa
    Author

    @Huuffy Thank you!!

  6. deleted a comment from on Jun 10, 2026
  7. lonexreb commented on Aug 31, 2026

    @lonexreb
    Contributor

    Picking this up (@Huuffy — you volunteered back in March; since no PR appeared in the five months since I'll carry it, but happy to fold in your review or cede to WIP if you have any).

    State of the world since this was filed: #6222 shipped S3 dataset loading (core/training/s3_dataset.py — bucket/prefix/credentials or IAM-role config, download to a temp dir, feed the local-file loader). What it deliberately supports is tabular files only (.parquet/.json/.jsonl/.csv): the key listing filters audio files out, the download flattens paths (so a audio/x.wav reference in a metadata file would break even if downloaded), and the single-format validation would reject a metadata+audio mix outright. So the exact case this issue asks about — Whisper finetuning with audio on S3 plus a transcription manifest — still fails.

    Scoped plan, contained in s3_dataset.py so the trainer and routes stay untouched:

    1. List audio keys too (the same _AUDIO_EXTENSIONS the format detector uses).
    2. Single-format validation applies to the metadata files only; audio alongside is expected, audio with no metadata file is a clear error naming what's missing.
    3. When audio is present, preserve prefix-relative key structure on download (flat behavior unchanged for today's tabular-only prefixes).
    4. Rewrite the downloaded metadata's audio references to the materialized local paths — matching prefix-relative keys, s3://bucket/key URIs, and metadata-file-relative paths; anything unmatched is left alone.

    Credentials handling stays exactly as #6222 built it (explicit keys or default chain/IAM, never persisted). Tests follow the existing test_s3_dataset.py fake-client pattern, so they run without AWS.

  8. LeonxLJX commented on Sep 1, 2026

    @LeonxLJX

    I'd like to take this one ([Feature] Unsloth/ Whisper/Large-v3 - S3 Bucket connection). I'll look into the root cause and follow up with a PR. (claiming via @LeonxLJX)

  9. LeonxLJX commented on Sep 1, 2026

    @LeonxLJX

    I'd like to take this one ([Feature] Unsloth/ Whisper/Large-v3 - S3 Bucket connection). I'll look into the root cause and follow up with a PR. (claiming via @LeonxLJX)

  10. added a commit that references this issue on Oct 5, 2026
    95421ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions