Open shavit opened 2 months ago
Weights are now accessible independently of configurations for flexibility and without MLModel or conversion.
That's very cool @shavit! May I ask what use case you have in mind for this?
Edit: Oh, I see it's for your embeddings work. Any highlights on the general architecture you're considering?
Yes
Configurations
, but since LanguageModel
requires a model, I separated the weights initialization.
Embedding
module instead, since the language models in this module are tied to CoreML, and don't need this at the moment.Safetensor
and others can save updated weights into a file.The plan is to use models directly from local files or the hub, and maybe support more types like mlx/numpy.
Read model weights from safetensors.
Related https://github.com/huggingface/swift-transformers/pull/86