GLM Legal Weights: Download, Specs & Setup Guide - Access & API

GLM Legal Weights: Download, Specs & Setup Guide

GLM Legal weights explained: law-glm-10b file specs, license terms, hardware needs, and a step-by-step local deployment guide.

2026-10-14
GLM Legal Wiki Team
Quick Guide
  • GLM Legal weights are published for law-glm-10b and law-glm-10b-v2 on Hugging Face under Apache-2.0.
  • Total repository size is roughly 39.5 GB with 10B parameters per variant.
  • Loading requires trust_remote_code=True because GLM uses custom model code.
  • Plan for multi-GPU inference or CPU offloading; a single consumer GPU will not fit fp32 weights.
  • Always verify license conditions and output citations before production use.

GLM Legal Weights Overview

GLM Legal weights refer to the publicly released model checkpoints of the GLM-based legal language models hosted under the law-llm organization on Hugging Face. Two variants are available: the original law-glm-10b and its successor law-glm-10b-v2. Both are built on the GLM architecture from the THUDM/GLM repository and are oriented toward Chinese legal text understanding, legal question answering, and document analysis tasks.

Naming Note

"GLM Legal" is a community content-site name for these checkpoints, not a confirmed official commercial product name. Do not confuse these weights with Z.ai's GLM-Legal product line or the LawGLM open-source research project.

Propertylaw-glm-10blaw-glm-10b-v2
Parameters10B10B
ArchitectureGLMGLM
LicenseApache-2.0Apache-2.0
Repo size~39.5 GBSimilar checkpoint layout
HostHugging Face (law-llm org)Hugging Face (law-llm org)
Download statsLow monthly volume, fluctuatesLow monthly volume, fluctuates

Original variant

  • law-glm-10b
  • Baseline legal GLM checkpoint
  • Chinese legal corpora focus

Updated variant

  • law-glm-10b-v2
  • Refined release
  • Check model card for changes

Upstream base

  • THUDM/GLM
  • GLM architecture source
  • Training and inference code

Weight Files and Download

The checkpoint files live in each model repository's file tree. Download through huggingface-cli, git lfs, or the Transformers library. Because the repository is large, prefer resumable CLI downloads over browser fetching.

MethodCommand exampleBest for
huggingface-clihuggingface-cli download law-llm/law-glm-10bFull repo, resumable
Git LFSgit clone https://huggingface.co/law-llm/law-glm-10bMirroring the repo
Transformersfrom_pretrained("law-llm/law-glm-10b")Automatic pull at load time
Download Tip

Set HF_HOME to a disk with at least 80 GB free space to accommodate both variants plus cache overhead. Verify file integrity by comparing SHA values against the file tree listing on the model page.

Hardware Requirements

Running 10B-parameter GLM weights is memory-intensive. Use this table to plan deployment before downloading.

PrecisionApprox. memoryPractical setup
fp32~40 GBMulti-GPU server (2x A100 40G or similar)
fp16 / bf16~20 GBSingle A100 40G, or 2x 24 GB GPUs
8-bit quantized~10-12 GBSingle 16-24 GB GPU
CPU (offload)64 GB+ RAMTesting only, very slow
trust_remote_code

GLM checkpoints load custom modeling code. Passing trust_remote_code=True executes repository code locally. Review the code before running, and only pull weights from the official law-llm organization.

Step-by-Step Local Deployment

1

Prepare the environment

Install Python 3.8+, PyTorch with CUDA support, and Transformers. Confirm GPU memory matches your target precision from the hardware table above.

2

Download the weights

Use huggingface-cli download law-llm/law-glm-10b and verify the checkpoint files complete successfully before loading.

3

Load with trust_remote_code

Call AutoModel.from_pretrained("law-llm/law-glm-10b", trust_remote_code=True) and load the tokenizer the same way.

4

Run a first inference

Feed a short Chinese legal question with a clear prompt template. Keep generation parameters conservative (low temperature) for factual legal outputs.

5

Validate outputs

Cross-check every legal citation and factual claim against source statutes or case materials. Record hallucination cases for your evaluation log.

Deployment Checklist:

  • Verify disk space (80+ GB free)
  • Confirm GPU memory matches precision target
  • Review custom code before trust_remote_code
  • Test inference on a known legal question
  • Log citation accuracy and error cases
Ready for Testing

Once inference runs cleanly on sample prompts, benchmark the model against your own legal document set rather than relying solely on public benchmark scores.

License and FAQ

The weights are marked Apache-2.0, which permits commercial use, modification, and redistribution with proper attribution and notice inclusion. Verify the model card before commercial deployment, since downstream legal-accuracy obligations remain yours.

License Scope

Apache-2.0 covers the published weights, but it does not certify output accuracy. Any legal advice workflow built on GLM Legal weights should include human lawyer review and jurisdiction checks.

Q: Where can I download GLM Legal weights?

The weights are hosted on Hugging Face under the law-llm organization, with separate repositories for law-glm-10b and law-glm-10b-v2. Both are Apache-2.0 licensed.

Q: How large are the GLM Legal weights?

The law-glm-10b repository lists roughly 39.5 GB of model files for a 10B-parameter checkpoint. Plan disk space accordingly if you keep both variants.

Q: Can GLM Legal weights run on a single consumer GPU?

Only with quantization or offloading. Full-precision 10B weights need around 40 GB of memory, so fp16 on a 40 GB card or 8-bit quantization on a 16-24 GB card are the practical options.

Q: Why does loading require trust_remote_code?

GLM checkpoints ship custom modeling code that Transformers must execute locally. Review the repository code first, and only enable this flag for the official law-llm repositories.

Related Articles