20 Commits

Author SHA1 Message Date
Ruihang Lai d1ea69a872 [CI] Migrate lint from Jenkins to GitHub Actions, switch to ruff (#3486)
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that
runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is
rewritten around ruff (check + format), replacing the previous
isort/black/mypy/pylint/cmake-format stack, and gains yamllint,
taplo, check-yaml, and check-toml. The corresponding Jenkins Lint
stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts,
and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section
(select E/F/I/UP/RUF, line-length 100, py39 target) and a
[dependency-groups] lint entry; the stale isort/black/mypy/pylint
tool tables are dropped.

To get the codebase green under the new ruler, existing UP006/UP035/
UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via
inline `# noqa`, so new code in those forms is still flagged. Real
issues surfaced by the new rules are fixed directly: E741 renames
(ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012
ClassVar annotations for mutable class defaults, RUF013 explicit
`Optional[...]`, and RUF005 iterable unpacking.

With pylint and mypy gone from CI, this also strips all `# pylint:
disable/enable` and `# type: ignore` directives from Python sources
(PEP 484 `# type: <expr>` comments and `# fmt: off/on` are
preserved), and runs the resulting files through ruff-format.
2026-04-21 20:53:57 -04:00
Sidharth N. Babu e3d7badfbd CI FIxes (#3415)
This commit fixes most of the CI tests.
2026-02-08 22:12:43 -05:00
Ruihang Lai 9bf82acfc0 [Python] Add apache-tvm-ffi as package dependency (#3316)
This PR introduces apache-tvm-ffi to the package dependency
due to its separation in mainline tvm.
2025-08-25 22:51:08 -04:00
Ruihang Lai f870395c6b [Model] Qwen3 support (#3218)
This PR supports the Qwen3 and Qwen3MoE models. The FP8 support is
still in progress.

A bug of topk-softmax is fixed in the PR.
2025-04-30 14:04:48 -04:00
Ruihang Lai 56a5ff9f87 [DataType] Rename FP8 dtypes (#3155)
Following recent renaming in TVM, we now rename all FP8 dtypes:

* `e4m3_float8` is renamed to `float8_e4m3fn`,
* `e5m2_float8` is renamed to `float8_e5m2`.

This aligns with dtype names in PyTorch and ml_dtypes.

The delivered HuggingFace FP8 model repos might need update as well
to align with the rename.
2025-03-09 17:51:21 -04:00
Ruihang Lai 11672d40e0 [KVCache] Refactor KV cache interface and DeepSeek-v2 modeling (#3147)
This PR updates the KV cache interface following a recent refactor
in apache/tvm. We also update the DeepSeek-v2 modeling to use
the new KV cache interface.
2025-03-02 00:45:02 -05:00
Ruihang Lai e462885c77 [Python] Add sentencepiece as installation requirement (#3030)
This PR adds the sentencepiece package as a Python installation
requirement for tokenizer coverage when running `gen_config`.
2024-11-15 11:15:03 -05:00
Ruihang Lai d1ebaa5522 [Python] Update dependency for benchmark (#2951)
This PR updates the python package dependency that is required 
by when running `mlc_llm.bench`.
2024-09-28 09:58:05 -04:00
Tianqi Chen 8beed7a706 [REFACTOR] rename mlc_chat => mlc_llm (#1932)
This PR renames the mlc_chat pckage to the mlc_llm package
now that this is the new official flow. We also update the necessary
locations that might touch the package.
2024-03-12 00:02:37 -04:00
Ruihang Lai ac57c03ccc [Python] Lazy import of transformers for tiktoken conversion (#1860)
This PR moves the import of transformers into the function body
of tiktoken tokenizer conversion, so we do not have a force dependency
on transformers.
2024-02-28 20:59:23 -05:00
Rick Zhou e5b224ca4c [SLM] Remove C++ mlc_chat_cli in favor of the new SLM Python CLI (#1716)
This PR removes the old C++ based mlc_chat_cli in favor
of the new Python CLI built on top of the SLM pipeline.

- All files related to C++ based CLI is removed
- Docs are updated to point to the new CLI
2024-02-05 15:41:53 -05:00
Charlie Ruan 6a6eddf1bc [Setup] Add tiktoken as dependency as needed in gen_config (#1708) 2024-02-03 15:05:25 -05:00
Shrey Gupta ea30fe267d [Fix] MLC LLM Python Package Dependencies and Docs (#1662)
* [Fix] Package installation in mlc_chat setup

* [Docs] Update Docs for MLC LLM Python Install and Python API
2024-01-25 10:35:15 -05:00
Junru Shao 53e159b8c1 Establish CUDA CI (#1419) 2023-12-11 14:28:38 -08:00
Junru Shao 8304d4c320 Add mlc_chat.__main__ as command line entrypoint (#1263)
This PR makes it possible to invoke mlc_chat subcommands directly.

Previously one has to use `python -m` as the prefix to invoke
`mlc_chat`:

```bash
python -m mlc_chat compile \
  --model /models/Llama-2-7b-chat-hf \
  --quantization q4f16_1 \
  --max-sequence-length 4096 \
  -o ./llama.so
```

This PR makes is possible to use it without the `python -m` prefix:

```bash
mlc_chat compile \
  --model /models/Llama-2-7b-chat-hf \
  --quantization q4f16_1 \
  --max-sequence-length 4096 \
  -o ./llama.so
```
2023-11-14 20:25:53 -08:00
Junru Shao 2193767fa2 Enable Mypy and Pylint in mlc_chat Python Package (#1149) 2023-10-29 16:35:07 -07:00
Junru Shao e8ce2c6438 [Doc] Convert Leftovers from mlc.ai/mlc-llm to llm.mlc.ai (#989) 2023-09-27 16:53:35 -07:00
Zihao Ye b939ac6312 [Doc] Refactor the structure (v1) (#424) 2023-06-16 21:17:29 -04:00
Zihao Ye e366975daa Allow user to customized ports in gradio and rest. (#418) 2023-06-15 22:14:17 -07:00
Tianqi Chen 096c8a5008 Refactor mlc_chat into a formal package (#266)
This PR refactors the mlc-chat into a formal package
Still need some followup TODOs on cleaning up
the rest and gradio API.
2023-05-29 18:00:06 -04:00