neural-compressor
Copilot instructions2.7k starsChanged 5 months agoApache-2.0View on GitHub
This file configures GitHub Copilot (code suggestions and PR reviews) to follow the coding standards enforced by the project's pre-commit hooks (.pre-commit-config.yaml) and tool configuration (pyproject.toml). - Use black style formatting for all Python files (excluding examples/, neuralcompressor/torch/algorithms/fp8quant/, and test/torch/). - Line length: 120 characters. - Use double quotes for strings. - Indent with 4 spaces; never use tabs. - Respect magic trailing commas. - Sort imports with isort using the black profile. - Maximum line length for imports: 120…
We split this copilot-instructions.md into the rules it gives an agent
17 rules. About 0 are common, 4 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use black style formatting for all Python files (excluding examples/, neural_compressor/torch/algorithms/fp8_quant/, and test/torch/).
- Distinctive: line 14
Use double quotes for strings.
- Very specific: line 22
Treat neural_compressor as a first-party package.
- Very specific: line 23
Do not modify __init__.py files' imports.
- Very specific: line 29
Follow ruff rules E4, E7, E9, and F (Pyflakes + pycodestyle errors).
- Distinctive: line 50
Do not wrap summary lines or description lines (wrapping is disabled).
- Very specific: line 64
All code under neural_compressor/ must pass bandit at low severity (-lll) and low confidence (-iii) thresholds.
- Distinctive: line 66
Do not suggest patterns that introduce common security issues such as:
- Very specific: line 67
Use of subprocess with shell=True
- Very specific: line 69
Use of pickle, yaml.load (without Loader), eval, or exec
- Distinctive: line 74
Ensure all identifiers, comments, and documentation are correctly spelled.
- Very specific: line 79
Remove # noqa comments that are no longer suppressing any active lint warning.
- Very specific: line 83
Do not include breakpoint(), pdb.set_trace(), or any other debug statement in committed code.
- Very specific: line 88
No trailing whitespace in .py, .rst, .cmake, .yaml, or .yml files (except files under examples/, neural_compressor/torch/utils/, …
- Very specific: line 100
Every new file under neural_compressor/ with extension .py, .yaml, .yml, or .sh must include the Apache 2.0 license header at the top …
- Very specific: line 120
Do not add the header again if a Copyright notice already exists in the file.
- Very specific: line 124
Keep requirements*.txt files sorted and deduplicated (except those under examples/).
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot Instructions
This file configures GitHub Copilot (code suggestions and PR reviews) to follow the coding
standards enforced by the project's pre-commit hooks (.pre-commit-config.yaml) and
tool configuration (pyproject.toml).
Python formatting – black
- Use black style formatting for all Python files (excluding
examples/,neural_compressor/torch/algorithms/fp8_quant/, andtest/torch/). - Line length: 120 characters.
- Use double quotes for strings.
- Indent with 4 spaces; never use tabs.
- Respect magic trailing commas.
Import ordering – isort
- Sort imports with isort using the
blackprofile. - Maximum line length for imports: 120 characters.
- Treat
neural_compressoras a first-party package. - Do not modify
__init__.pyfiles' imports. - Applies to all Python files except
examples/,neural_compressor/torch/algorithms/fp8_quant/, andtest/torch/.
Linting – ruff
- Follow ruff rules
E4,E7,E9, andF(Pyflakes + pycodestyle errors). - Target Python 3.10 syntax.
- Line length: 120 characters; indent width: 4 spaces.
- The following rule IDs are intentionally ignored in this project and must not be
flagged as issues:
E402– module-level import not at top of fileE501– line too longE721– type comparison (usingisinstance()is preferred but not enforced)E722– bareexceptE731– lambda assigned to variableE741– ambiguous variable names (l,O,I)F401– imported but unusedF403/F405– star importsF841– local variable assigned but never used
- Underscore-prefixed variables are allowed to be unused.
- Applies to all Python files except
examples/,neural_compressor/torch/algorithms/fp8_quant/, andtest/torch/.
Docstrings – docformatter
- Format docstrings using Google style.
- Do not wrap summary lines or description lines (wrapping is disabled).
- Docstrings must be black-compatible.
- Applies to all Python files except
examples/,neural_compressor/torch/algorithms/fp8_quant/, andtest/torch/.
Docstring examples in documentation – blacken-docs
- Code blocks inside Markdown and reStructuredText documentation files must also follow black formatting with line length 120.
- Applies to all docs except
examples/,docs/source/JAX.md,neural_compressor/torch/algorithms/fp8_quant/, andtest/torch/.
Security – bandit
- All code under
neural_compressor/must pass bandit at low severity (-lll) and low confidence (-iii) thresholds. - Do not suggest patterns that introduce common security issues such as:
- Use of
subprocesswithshell=True - Hard-coded passwords or secrets
- Use of
pickle,yaml.load(withoutLoader),eval, orexec - Insecure use of temporary files or random number generators in security contexts
- Use of
Spelling – codespell
- Ensure all identifiers, comments, and documentation are correctly spelled.
- The project uses codespell to detect and auto-fix typos.
Unused # noqa comments – yesqa
- Remove
# noqacomments that are no longer suppressing any active lint warning.
Debug statements
- Do not include
breakpoint(),pdb.set_trace(), or any other debug statement in committed code.
Whitespace and file hygiene
- No trailing whitespace in
.py,.rst,.cmake,.yaml, or.ymlfiles (except files underexamples/,neural_compressor/torch/utils/,neural_compressor/torch/algorithms/fp8_quant/, andtest/torch/quantization/). - All
.py,.md,.rst,.yaml, and.ymlfiles must end with a single newline character (except files underexamples/,neural_compressor/torch/algorithms/fp8_quant/, andtest/torch/algorithms/fp8_quant/). - JSON files must be valid (except
.vscode/settings_recommended.json). - YAML files must be valid.
License headers
Every new file under
neural_compressor/with extension.py,.yaml,.yml, or.shmust include the Apache 2.0 license header at the top (within the first 40 lines). The header template is:# Copyright (c) YYYY Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.- Do not add the header again if a
Copyrightnotice already exists in the file.
Requirements and dependency files
- Keep
requirements*.txtfiles sorted and deduplicated (except those underexamples/).
Scope of these rules
These rules apply to all code suggestions and PR review comments made by Copilot in this repository. When suggesting changes, Copilot should ensure the resulting code would pass all the pre-commit hooks listed above. If a file path matches one of the exclusion patterns for a given hook, that specific rule does not need to be applied to that file.
Trending
Quiet since July.about the whole repository
Who's talking about intel/neural-compressor
- vllm-project/llm-compressor“docs(autoround): clarify MXFP8 Qwen3-32B note and update example batch_size guidance”GitHub · May 25, 2026 · 2 reactions
- vllm-project/llm-compressor“Fix AutoRound ignore-layer metadata handling and add Qwen3-30B to mxfp8 example.”GitHub · May 11, 2026 · 2 reactions
- Starnodes2024/comfyui-starnodes-modelconverter“Add MXFP8 Support”GitHub · Jul 5, 2026 · 1 reactions
- onnx/steering-committee“Neural compressor Proposal - to add port the repo under Intel to ONNX organization”GitHub · May 9, 2022 · 1 reactions
- Stack Overflow“"ValueError: numpy.ndarray size changed " while trying Intel lpot in tensorflow model”Stack Overflow · Oct 4, 2021 · 1 votes
The biggest 5 of 45 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 45
Talked about on GitHub and Stack Overflow (45 times).
On GitHub · 44
- May 25, 2026docs(autoround): clarify MXFP8 Qwen3-32B note and update example batch_size guidance — vllm-project/llm-compressor2 reactions · 8 comments
- May 11, 2026Fix AutoRound ignore-layer metadata handling and add Qwen3-30B to mxfp8 example. — vllm-project/llm-compressor2 reactions · 8 comments
- Jul 5, 2026Add MXFP8 Support — Starnodes2024/comfyui-starnodes-modelconverter1 reaction · 2 comments
- May 9, 2022Neural compressor Proposal - to add port the repo under Intel to ONNX organization — onnx/steering-committee1 reaction · 16 comments
- Jun 18, 2026Withdraw MAL-2026-1035 neural-compressor-jax (false positive — legitimate Intel package) — ossf/malicious-packages0 reactions · 8 comments
39 more on GitHub
- Jun 18, 2026Withdraw MAL-2026-1035 neural-compressor-jax false positive — ossf/malicious-packages0 reactions
- May 19, 2026[Add] neural-compressor (intel/neural-compressor) — PyTorchKR/landscape0 reactions · 4 comments
- Apr 3, 2026[Bug]: Quantized MXFP model export in llmc format failed with inference — intel/auto-round0 reactions · 3 comments
- Mar 30, 2026PEP 541 Request: neural-compressor-jax — pypi/support0 reactions · 6 comments
- Mar 4, 2026[Task]: Extend XPU CI test — intel/auto-round0 reactions
- Jan 8, 2026Bump neural-compressor from 3.6 to 3.7 — Vaksth/02476_exercises0 reactions
- Dec 22, 2025Ensure padding not exceeds VLLM_HPU_FSDPA_SLICE_CHUNK_SIZE — HabanaAI/vllm-hpu-extension0 reactions · 5 comments
- Dec 19, 2025NVFP4 tuning got device mismatch — intel/auto-round0 reactions · 3 comments
- Dec 1, 2025Ensure seq_len padding less than VLLM_HPU_FSDPA_SLICE_CHUNK_SIZE — HabanaAI/vllm-hpu-extension0 reactions
- Aug 28, 2025[DeepSeek R1] add chunk moe args on deepseek_r1 — HabanaAI/vllm-fork0 reactions · 7 comments
- May 16, 2025[DeepSeek][G2] Use naive scaling and full pile — HabanaAI/vllm-fork0 reactions · 1 comment
- May 13, 2025[DeepSeek] Update Docs for Setting Measurement Results Path — HabanaAI/vllm-fork0 reactions · 1 comment
- Apr 22, 2025Revert to old way of calling fused_scaled_dot_product_attention — HabanaAI/vllm-fork0 reactions · 1 comment
- Apr 4, 2025Update deepseek modeling file for PatchedVLLMKVCache — HabanaAI/vllm-fork0 reactions
- Mar 5, 2025Skip `mlp.gate` (MoE only) — yiliu30/vllm-fork0 reactions
- Feb 25, 2025[P22 rebase][Enabled MLA][Enable KVCache] — yiliu30/vllm-fork0 reactions
- Feb 24, 2025[2/24] [P22 Rebase][MLA] — yiliu30/vllm-fork0 reactions
- Feb 21, 2025[2/21-2] Quantize BF16 Model on Single Node — yiliu30/vllm-fork0 reactions
- Feb 20, 2025[2/20] Inference/Prepare/Quantize BF16 R1 — yiliu30/vllm-fork0 reactions
- Feb 13, 2025Exclude node quantization in RTN — microsoft/onnxruntime0 reactions
- Nov 27, 2024[HPU]Enhance `numba` check — intel/auto-round0 reactions
- Nov 5, 2024HPU only release binary — intel/auto-round0 reactions · 2 comments
- Oct 24, 2024Fix bias update in scoped all reduce — huggingface/optimum-habana0 reactions · 8 comments
- Sep 11, 2024[New Feature Request] layer wise sensitivity analysis — intel/auto-round0 reactions
- Sep 9, 2024Bump the tensorflow group across 1 directory with 2 updates — intel/ai-containers0 reactions · 3 comments
- Sep 2, 2024Bump neural-compressor from 3.0 to 3.0.1 in /tensorflow in the tensorflow group — intel/ai-containers0 reactions · 4 comments
- Aug 16, 2024Bump the tensorflow group across 1 directory with 8 updates — intel/ai-containers0 reactions · 3 comments
- Aug 12, 2024Bump the tensorflow group across 1 directory with 9 updates — intel/ai-containers0 reactions · 2 comments
- Jun 18, 2024Enable autoround quantization — huggingface/optimum-intel0 reactions · 2 comments
- Apr 19, 2024[oneDNN] QuantizeV2 with bfloat16 Input — tensorflow/tensorflow0 reactions · 12 comments
- Jan 17, 2024Intel Neural Compressor — he-y/Awesome-Pruning0 reactions · 1 comment
- Jan 11, 2024[Feature Request] Support for TEQ — unslothai/unsloth0 reactions · 2 comments
- Jan 3, 2024Is this pass flow possible for Stable Diffusion?: OrtTransformersOptimization → IncDynamicQuantization or IncStaticQuantization — microsoft/Olive0 reactions · 46 comments
- Jan 1, 2024Update neural-compressor requirement from ~=2.1.1 to ~=2.4.1 — intel/visual-quality-inspection0 reactions
- Nov 1, 2023Intel NNCF functions for Pruning, Distilling and Quantizing for Seq2Seq Task — huggingface/optimum-intel0 reactions · 1 comment
- Sep 12, 2023New submissions for Tue, 12 Sep 23 — zoq/arxiv-updates0 reactions
- May 11, 2023Cannot convert serving signature function to concrete function for Large Language Models (Protobuf error) — tensorflow/tensorflow0 reactions · 11 comments
- Jul 15, 2022Feat: Prune/Compress the nnUNet models for performance gains. — ENHANCE-PET/MOOSE0 reactions · 5 comments
- Feb 1, 2022Error executing tensorflow resnet50 — mlcommons/inference_results_v1.00 reactions · 1 comment
On Stack Overflow · 1
- Oct 4, 2021"ValueError: numpy.ndarray size changed " while trying Intel lpot in tensorflow model1 vote · 1 answer
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

