Skip to content

Proposal: load models from an internal source - #322

Draft
gerardo-navarro wants to merge 1 commit into
developfrom
feature_internal_model_source
Draft

gerardo-navarro wants to merge 1 commit into
developfrom
feature_internal_model_source

Conversation

@gerardo-navarro

@gerardo-navarro gerardo-navarro commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Design proposal for discussion, no code yet. Organisations whose clients cannot reach Hugging Face (e.g. a city administration, see #318) want to put the models on an internal web server or network share once and have every aTrain installation load them from there.

Proposal in docs/proposals/internal-model-source.md:

  • One setting model_source: a URL or a path (incl. UNC). When set, aTrain loads models only from there and never contacts Hugging Face.
  • Layout at the source = a normal local models folder, so IT can just copy one.
  • download_model() gets a second branch that fetches every file listed in the models.json manifest, then the existing verify_model() checks the pinned SHA-256. No Hugging Face API needed; a wrong or tampered source fails verification.
  • Configuration: environment variable ATRAIN_MODEL_SOURCE first; later a config.toml (user, then machine-wide in %ProgramData% / /etc), read with stdlib tomllib.
  • Also documents how aTrain is configured today (env vars only, no config file) and why HF_ENDPOINT alone does not fit a plain web server or share.

Feedback wanted on the open questions at the end of the doc, especially: no fallback to Hugging Face when a source is set.

Note: the doc links to docs/offline-model-install.md, which #320 adds.

References

Refs #318, related to #320

Screenshots / Examples

n/a (proposal)

Verification Steps

  • Read docs/proposals/internal-model-source.md and comment on the approach and the open questions.
  • Once agreed, a follow-up PR implements step 1 (ATRAIN_MODEL_SOURCE + download branch + tests + docs); this PR then either merges as the design record or is closed.

Design proposal for organisations whose clients cannot reach Hugging
Face: a model_source setting (URL or path) that aTrain loads pinned
models from, verified against the checksums in models.json.
@gerardo-navarro
gerardo-navarro force-pushed the feature_internal_model_source branch from 04a9ccd to 569e6f4 Compare October 27, 2026 09:08
@is-hki

is-hki commented Oct 29, 2026

Copy link
Copy Markdown

Just want to leave a comment, that this could be very desirable in case of transcription of sensitive interviews which is quite commonplace in the academic field of humanities, for instance - handling of such data may be restricted to isolated environments by default.

@gerardo-navarro

gerardo-navarro commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Just want to leave a comment, that this could be very desirable in case of transcription of sensitive interviews which is quite commonplace in the academic field of humanities, for instance - handling of such data may be restricted to isolated environments by default.

@is-hki Thanks for the feedback. I agree 💯 . We got this requirement while deploying aTrain in an enterprise IT environment which could be / is very similar to what you are describing.

We am working on a solution for this 👍

@JuergenFleiss

Copy link
Copy Markdown
Collaborator

Just want to leave a comment, that this could be very desirable in case of transcription of sensitive interviews which is quite commonplace in the academic field of humanities, for instance - handling of such data may be restricted to isolated environments by default.

Thanks for opening the discussion.

For default use I think that the current implementation of models being downloaded from a verified atrain huggingface repository is ok on a standard universtiy machine, as aTrain does not send any interview data anywhere. A number of universities have implemented atrain as is for local / offline interview transcription, including my own University of Graz.

Yes, but I would argue that this is only for the most critical data where you want no internet access from the machine anyway.

Do you know any cases where such a requirement was enacted?

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