ChatGLM-6B: An Open Bilingual Dialogue Language Model | 开源双语对话语言模型
This report summarizes scanner evidence for zai-org/ChatGLM-6B, a Python project with 40,840 GitHub stars. SynthScan examined 7,089 lines of code across 33 source files, recording 65 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 10.4 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-27.
Can maintainers explain intent, assumptions, and trade-offs? 48 finding(s).
Are imports declared and package/API names verified? 12 finding(s).
Are wrappers, guards, and repeated structures necessary? 18 finding(s).
Which changes need focused human review? 65 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 65 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | web_demo_vision.py | 26 | CODE | |
| LOW | cli_demo_vision.py | 31 | CODE | |
| LOW | cli_demo.py | 29 | CODE | |
| LOW | web_demo.py | 26 | CODE | |
| LOW | ptuning/trainer.py | 307 | CODE | |
| LOW | ptuning/trainer.py | 896 | CODE | |
| LOW | ptuning/trainer.py | 1039 | CODE | |
| LOW | ptuning/trainer.py | 1096 | CODE | |
| LOW | ptuning/trainer.py | 1217 | CODE | |
| LOW | ptuning/trainer.py | 1303 | CODE | |
| LOW | ptuning/trainer.py | 1364 | CODE | |
| LOW | ptuning/trainer.py | 1642 | CODE | |
| LOW | ptuning/trainer.py | 2055 | CODE | |
| LOW | ptuning/trainer.py | 2075 | CODE | |
| LOW | ptuning/trainer.py | 2133 | CODE | |
| LOW | ptuning/trainer.py | 2286 | CODE | |
| LOW | ptuning/trainer.py | 2392 | CODE | |
| LOW | ptuning/trainer.py | 2562 | CODE | |
| LOW | ptuning/trainer.py | 2720 | CODE | |
| LOW | ptuning/trainer.py | 2812 | CODE | |
| LOW | ptuning/trainer.py | 3303 | CODE | |
| LOW | ptuning/main.py | 49 | CODE | |
| LOW | ptuning/main.py | 159 | CODE | |
| LOW | ptuning/main.py | 187 | CODE | |
| LOW | ptuning/web_demo.py | 42 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | web_demo_vision.py | 0 | copy from https://github.com/gaizhenbiao/chuanhuchatgpt/ | STRING |
| HIGH | web_demo.py | 0 | copy from https://github.com/gaizhenbiao/chuanhuchatgpt/ | STRING |
| HIGH | ptuning/web_demo.py | 0 | copy from https://github.com/gaizhenbiao/chuanhuchatgpt/ | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | cli_demo_vision.py | 7 | CODE | |
| LOW | cli_demo.py | 5 | CODE | |
| LOW | utils.py | 2 | CODE | |
| LOW | ptuning/trainer.py | 305 | CODE | |
| LOW | ptuning/trainer.py | 305 | CODE | |
| LOW | ptuning/trainer.py | 305 | CODE | |
| LOW | ptuning/trainer.py | 305 | CODE | |
| LOW | ptuning/web_demo.py | 7 | CODE | |
| LOW | ptuning/web_demo.py | 8 | CODE | |
| LOW | ptuning/web_demo.py | 8 | CODE | |
| LOW | ptuning/web_demo.py | 8 | CODE | |
| LOW | ptuning/web_demo.py | 19 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | utils.py | 8 | def auto_configure_device_map(num_gpus: int) -> Dict[str, int]: | CODE |
| LOW | ptuning/trainer.py | 723 | def _set_signature_columns_if_needed(self): | CODE |
| LOW | ptuning/trainer.py | 757 | def _get_collator_with_removed_columns( | CODE |
| LOW | ptuning/trainer.py | 1023 | def create_optimizer_and_scheduler(self, num_training_steps: int): | CODE |
| LOW | ptuning/trainer.py | 1096 | def get_optimizer_cls_and_kwargs(args: TrainingArguments) -> Tuple[Any, Any]: | CODE |
| LOW | ptuning/trainer.py | 2193 | def _issue_warnings_after_load(self, load_result): | CODE |
| LOW | ptuning/trainer.py | 2392 | def _load_optimizer_and_scheduler(self, checkpoint): | CODE |
| LOW | ptuning/trainer.py | 2596 | def compute_loss_context_manager(self): | CODE |
| LOW | ptuning/trainer.py | 2602 | def autocast_smart_context_manager(self, cache_enabled: Optional[bool] = True): | CODE |
| LOW | ptuning/trainer.py | 3793 | def _add_sm_patterns_to_gitignore(self) -> None: | CODE |
| LOW | ptuning/main.py | 187 | def preprocess_function_train(examples): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ptuning/trainer.py | 1734 | # Check if saved optimizer or scheduler states exist | COMMENT |
| LOW | ptuning/trainer.py | 1759 | # Check if continuing training from a checkpoint | COMMENT |
| LOW | ptuning/trainer.py | 2886 | # Check if we should delete older checkpoint(s) | COMMENT |
| LOW | ptuning/trainer.py | 3176 | # Set back to None to begin a new accumulation | COMMENT |
| LOW | ptuning/trainer.py | 3735 | # Set back to None to begin a new accumulation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | ptuning/trainer.py | 3572 | Upload *self.model* and *self.tokenizer* to the 🤗 model hub on the repo *self.args.hub_model_id*. Para | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ptuning/trainer_seq2seq.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | ptuning/trainer.py | 1 | # coding=utf-8 | COMMENT |
| LOW | ptuning/main.py | 1 | #!/usr/bin/env python | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ptuning/trainer.py | 1911 | # if loss is nan or inf simply add the average of previous logged losses | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ptuning/trainer.py | 2278 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ptuning/trainer.py | 307 | CODE | |
| LOW | ptuning/trainer.py | 3473 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ptuning/main.py | 47 | logger = logging.getLogger(__name__) | CODE |