【Hacker News搬运】苹果发布用于训练深度神经网络的库CoreNet
-
Title: Apple releases CoreNet, a library for training deep neural networks
苹果发布用于训练深度神经网络的库CoreNet
Text:
Url: https://github.com/apple/corenet
CoreNet是一个用于训练深度神经网络的库,它允许研究人员和工程师训练标准和小规模以及大规模的新颖模型,用于各种任务,包括基础模型(如CLIP和LLM)、物体分类、物体检测和语义分割。 最新的更新是2024年4月,CoreNet库的0.1.0版本包括了OpenELM、CatLIP和MLX示例。苹果公司使用CoreNet进行的研究工作包括OpenELM、CatLIP、Reinforce Data, Multiply Impact、CLIP meets Model Zoo Experts、FastVit、Bytes Are All You Need、MobileOne、RangeAugment、Separable Self-attention for Mobile Vision Transformers (MobileViTv2)和CVNets等。 CoreNet的安装需要Git LFS,并且建议在Linux上使用Python 3.10+和PyTorch (版本 >= v2.1.0),在macOS上使用Python 3.9+。CoreNet的目录结构包括入门指南、训练配方、MLX示例、模型实现、数据集和其他关键目录。 维护者包括Sachin、Maxwell Horton、Mohammad Sekhavat和Yanzi Jin。此外,CoreNet从CVNets发展而来,扩展了其应用范围,包括基础模型的训练,如LLM。如果觉得这个项目有用,可以引用以下论文:Mehta, Sachin and Abdolhosseini, Farzad and Rastegari, Mohammad, CVNets: High Performance Library for Computer Vision, Proceedings of the 30th ACM International Conference on Multimedia, MM '22。
Post by: rocauc
Comments:
gbickford: > Relationship with CVNets<p>> CoreNet evolved from CVNets, to encompass a broader range of applications beyond computer vision. Its expansion facilitated the training of foundational models, including LLMs.<p>We can expect it to have grown from here: <a href="https://apple.github.io/ml-cvnets/index.html" rel="nofollow">https://apple.github.io/ml-cvnets/index.html</a><p>It looks like a mid-level implementations of training and inference. You can see in their "default_trainer.py"[1] that the engine uses Tensors from torch but implements its own training method. They implement their own LR scheduler and optimizer; the caller can optionally use Adam from torch.<p>It's an interesting (maybe very Apple) choice to build from the ground up instead of partnering with existing frameworks to provide first class support in them.<p>The MLX examples seem to be inference only at this point. It does look like this might be a landing ground for more MLX specific implementations: e.g. <a href="https://github.com/apple/corenet/blob/5b50eca42bc97f6146b812a3e3469959da5da0ec/mlx_examples/clip/model.py#L402">https://github.com/apple/corenet/blob/5b50eca42bc97f6146b812...</a><p>It will be interesting to see how it tracks over the next year; especially with their recent acquisitions:<p>Datakalab <a href="https://news.ycombinator.com/item?id=40114350">https://news.ycombinator.com/item?id=40114350</a><p>DarwinAI <a href="https://news.ycombinator.com/item?id=39709835">https://news.ycombinator.com/item?id=39709835</a><p>1: <a href="https://github.com/apple/corenet/blob/main/corenet/engine/default_trainer.py">https://github.com/apple/corenet/blob/main/corenet/engine/de...</a>
gbickford: >;与CVNets的关系<p>>;CoreNet从CVNets演变而来,涵盖了计算机视觉之外更广泛的应用。它的扩展促进了基础模型的培训,包括LLM<p> 我们可以期待它从这里开始生长:<a href=“https://;/;apple.github.io/:ml cvnets/!index.html”rel=“nofollow”>https:///;apple.github.io/;ml cvnets;index.html</a><p>它看起来像是训练和推理的中级实现。你可以在他们的“;default_trainer.py”;[1] 引擎使用torch中的张量,但实现自己的训练方法。它们实现了自己的LR调度器和优化器;呼叫者可以选择性地使用来自torch的Adam<p> 它;这是一个有趣的(可能非常像苹果)选择,从头开始构建,而不是与现有框架合作,在其中提供一流的支持<p> MLX的例子似乎只是在这一点上的推论。看起来这可能是更多MLX特定实现的着陆点:例如,<a href=“https://;/;github.com/:apple/,corenet/。blob/!5b50eca42bc97f6146b812a3e3469959da5da0ec/…MLX_examples/?clip/
model.py#L402”>https:///;github.com/;apple/;corenet;blob;5b50eca42bc97f6146b812…</a><p>看看它在明年的跟踪情况会很有趣;尤其是最近的收购:<p>Datakalab<a href=“https://;/;news.ycombinator.com/?id=40114350”>https:///;news.ycombinator.com/;项目id=40114350</a><p>DarwinAI<a href=“https:/;新闻.ycombinator.com/?项目?id=39709835”>https:ȏ/;news.ycombinator.com/;项目id=39709835</a><p>1:<a href=“https://;/;github.com/:apple/,corenet/。blob/!main//;github.com/;apple/;corenet;blob;main;corenet;发动机;de</a>
leodriesch: How does this compare to MLX? As far as I understand MLX is equivalent to PyTorch but optimized for Apple Silicon.<p>Is this meant for training MLX models in a distributed manner? Or what is its purpose?
leodriesch: 这与MLX相比如何?据我所知,MLX相当于PyTorch,但针对Apple Silicon进行了优化<p> 这是为了以分布式方式训练MLX模型吗?或者它的目的是什么?
ipsum2: It's interesting that Apple also actively develops <a href="https://github.com/apple/axlearn">https://github.com/apple/axlearn</a>, which is a library on top of Jax. Seems like half the ML teams at Apple use PyTorch, and the other half uses Jax. Maybe its split between Google Cloud and AWS?
ipsum2: 它;有趣的是,苹果还积极开发<a href=“https://;/;github.com/,Apple/!axlearn”>https:///;github.com/;apple/;axlearn</a>,它是Jax之上的一个库。苹果的ML团队似乎有一半使用PyTorch,另一半使用Jax。也许是谷歌云和AWS之间的分歧?
coder543: They also mention in the README:<p>> CatLIP: CLIP-level Visual Recognition Accuracy with 2.7x Faster Pre-training on Web-scale Image-Text Data<p>This is the first I’m hearing of that, and the link seems broken.
coder543: 他们还在自述中提到:<p>>;CatLIP:CLIP级别的视觉识别精度,在网络规模的图像文本数据上的预训练速度快2.7倍<p>这是我第一次听说,链接似乎断了。
mxwsn: Built on top of pytorch.
mxwsn: 建在pytorch的顶部。