Comments (1)
Most HuggingFace models are (default) already in PyTorch. Check out the https://github.com/ml-explore/mlx-examples repo, there's a script to convert the weights from HuggingFace BERT to an MLX model: https://github.com/ml-explore/mlx-examples/blob/main/bert/convert.py
The rest of the BERT example shows how the model is implemented. You need to ensure that the tensors are mapped correctly and that the computations are set up exactly the same.
from mlx.
Related Issues (20)
- [BUG] Stubs generation on initial setup HOT 2
- [Feature Request] Support `stop_gradient` globally HOT 1
- [BUG] Cannot delete model from memory after using 'generate' from mlx_lm.utils HOT 4
- [BUG] raise ValueError(f"Received parameters not in model: {extras} HOT 4
- Feature request: Support for dynamic user-defined kernel compilation
- [Feature] Cholesky decomposition
- [BUG] ValueError when loading fused QLoRA model: Parameters not in model HOT 1
- [BUG] Using `make test` (e.g. ctest) causes segfaults
- [BUG] ValueError: [quantize] The last dimension of the matrix needs to be divisible by the quantization group size 64. HOT 7
- [Feature] Add a `clip_grad_norm` to `mlx.optimizers`
- [BUG] Layernorm provide strange results during inference HOT 3
- [Feature Request] Support `numpy.ndarray.view`
- [BUG] HOT 1
- [BUG] Cannot install MLX locally HOT 5
- [Feature] Multi-Machine Support for Distributed Inference HOT 4
- [BUG] mlx_lm issue with Phi-3 fine tuned model: adding and repeating weird tokens
- [FEATURE] in keras LayerNorm by default is apply to last dimension only HOT 9
- [BUG] in-place updating of array slice unexpectedly fails due to broadcasting problem HOT 2
- [BUG] Matmul gives wrong output for large sizes HOT 4
- [BUG] broadcast of scalar array in last dimension fails after #1035
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlx.