mindnlp  by mindspore-lab

NLP/LLM framework for MindSpore, Hugging Face compatible

Created 3 years ago
888 stars

Top 40.8% on SourcePulse

GitHubView on GitHub
Project Summary

MindNLP is an open-source NLP and LLM framework built on MindSpore, designed for researchers and developers. It offers a user-friendly interface and high performance, aiming to simplify the construction and training of NLP models, with compatibility for Hugging Face models and datasets.

How It Works

MindNLP leverages MindSpore's capabilities to provide a unified dynamic and static graph execution environment. This allows for easy switching between modes with a single line of code (mindspore.jit), enabling rapid performance gains without sacrificing ease of use. It supports advanced features like distributed parallel inference for large models and quantization algorithms (SmoothQuant, int8) for efficient deployment across various hardware, including Ascend and GPU.

Quick Start & Requirements

  • Install via pip: pip install mindnlp
  • Source install: pip install git+https://github.com/mindspore-lab/mindnlp.git or clone and build.
  • Python versions: 3.7.5-3.11, depending on MindNLP version.
  • MindSpore versions: 1.8.1 to daily builds.
  • Full platform support includes Ascend 910, Ascend 310B, GPU, and CPU.

Highlighted Details

  • Supports 250+ pretrained models with Hugging Face transformers-like APIs.
  • Achieves 85ms/token inference speed for Llama on Ascend (dynamic graph) and 45ms/token (static graph).
  • Offers Sentence Transformer support for efficient RAG development.
  • Includes comprehensive data processing tools and a simplified training engine.

Maintenance & Community

MindSpore NLP SIG is the main development team. Community engagement is encouraged via GitHub Issues.

Licensing & Compatibility

Released under the Apache 2.0 license, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The dynamic version is still under development. Version compatibility between MindNLP and MindSpore requires careful attention to the provided table.

Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
21
Issues (30d)
8
Star History
5 stars in the last 30 days

Explore Similar Projects

Starred by Ross Wightman Ross Wightman(Author of timm; CV at Hugging Face), Awni Hannun Awni Hannun(Author of MLX; Research Scientist at Apple), and
1 more.

mlx-llm by riccardomusmeci

0%
454
LLM tools/apps for Apple Silicon using MLX
Created 1 year ago
Updated 7 months ago
Starred by Wing Lian Wing Lian(Founder of Axolotl AI) and Stas Bekman Stas Bekman(Author of "Machine Learning Engineering Open Book"; Research Engineer at Snowflake).

fms-fsdp by foundation-model-stack

0.4%
265
Efficiently train foundation models with PyTorch
Created 1 year ago
Updated 1 month ago
Starred by Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), Tri Dao Tri Dao(Chief Scientist at Together AI), and
1 more.

hnet by goombalab

1.5%
722
Hierarchical sequence modeling with dynamic chunking
Created 2 months ago
Updated 1 month ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
11 more.

ctransformers by marella

0.1%
2k
Python bindings for fast Transformer model inference
Created 2 years ago
Updated 1 year ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), and
17 more.

open_llama by openlm-research

0.1%
8k
Open-source reproduction of LLaMA models
Created 2 years ago
Updated 2 years ago
Feedback? Help us improve.