Repository navigation
Proposal: load models from an internal source - #322
gerardo-navarro wants to merge 1 commit into
Conversation
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.
04a9ccd to
569e6f4
Compare
|
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 👍 |
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? |
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:model_source: a URL or a path (incl. UNC). When set, aTrain loads models only from there and never contacts Hugging Face.download_model()gets a second branch that fetches every file listed in themodels.jsonmanifest, then the existingverify_model()checks the pinned SHA-256. No Hugging Face API needed; a wrong or tampered source fails verification.ATRAIN_MODEL_SOURCEfirst; later aconfig.toml(user, then machine-wide in%ProgramData%//etc), read with stdlibtomllib.HF_ENDPOINTalone 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
docs/proposals/internal-model-source.mdand comment on the approach and the open questions.ATRAIN_MODEL_SOURCE+ download branch + tests + docs); this PR then either merges as the design record or is closed.