- GLM Legal system requirements center on the law-glm-10b model: a 10B-parameter GLM-based legal AI model.
- The model repository weighs roughly 39.5 GB, so plan for 50+ GB of free disk space.
- Local inference with Transformers typically requires a GPU with 24 GB+ VRAM or CPU-only fallback at reduced speed.
- Software stack: Python, PyTorch, Hugging Face Transformers, plus the
trust_remote_codesetting. - The model is licensed under Apache-2.0 and hosted on Hugging Face.
Understanding GLM Legal System Requirements
GLM Legal refers to the law-glm-10b and law-glm-10b-v2 models published under the law-llm organization on Hugging Face. These are GLM-architecture language models fine-tuned for Chinese legal text understanding, so their system requirements follow the pattern of any 10B-parameter open-weight model: the bottleneck is GPU memory, followed by disk space and CPU RAM.
Before downloading anything, review the baseline profile below. Note that "GLM Legal" is a community/content-site name for the law-glm-10b model family — there is no separate installer or launcher to worry about.
| Component | Minimum | Recommended |
|---|---|---|
| Model parameters | 10B (law-glm-10b) | 10B (law-glm-10b-v2) |
| Model file size | ~39.5 GB | ~39.5 GB + cache headroom |
| Free disk space | 50 GB | 80+ GB (SSD) |
| GPU VRAM (FP16) | 24 GB | 32–48 GB or multi-GPU |
| GPU VRAM (quantized) | 12–14 GB (INT8/INT4) | 24 GB |
| System RAM | 32 GB | 64 GB |
| OS | Linux (Ubuntu 20.04+) | Linux with CUDA 11.8+ |
Always verify the current file listing on the model repository — weight shards, tokenizer files, and configuration may change between law-glm-10b and law-glm-10b-v2.
Hardware Tiers Compared
Not every machine can run a 10B model comfortably. Use this tier breakdown to match your hardware to a realistic deployment mode.
Entry Tier (Quantized)
- 12–14 GB VRAM or CPU-only
- INT4/INT8 quantization required
- Slower inference, acceptable for testing
- Good for prompt experiments
Standard Tier (Single GPU)
- 24 GB VRAM (e.g., RTX 3090/4090 class)
- FP16 or BF16 inference
- Comfortable batch size 1–4
- Best fit for most developers
Pro Tier (Multi-GPU)
- 48 GB+ VRAM across GPUs
- Larger batches, longer contexts
- Fine-tuning becomes feasible
- Suited for research workloads
| Deployment mode | VRAM needed | Speed | Best for |
|---|---|---|---|
| CPU inference | 0 GB (32–64 GB RAM) | Very slow | Sanity checks only |
| INT4 quantized GPU | ~12–14 GB | Moderate | Laptops, single-GPU testing |
| FP16 single GPU | ~22–24 GB | Fast | Daily legal QA workflows |
| Multi-GPU FP16 | 48 GB+ | Fastest | Batch processing, evaluation |
Loading a 10B model in FP16 allocates roughly 20 GB of weights alone. If your GPU has less VRAM than the checkpoint requires, expect out-of-memory errors rather than graceful degradation — quantize or shard the model instead.
Software Requirements and Setup Steps
The software stack is straightforward: Python 3.8+, PyTorch with CUDA support, and Hugging Face Transformers. Because the GLM architecture ships custom modeling code, you will need trust_remote_code=True when loading both the tokenizer and the model.
| Software | Version guidance | Purpose |
|---|---|---|
| Python | 3.8–3.10 | Runtime environment |
| PyTorch | 2.x with CUDA 11.8+ | GPU tensor operations |
| Transformers | Latest stable | Model/tokenizer loading |
| CUDA driver | 11.8 or newer | GPU acceleration |
| Git LFS | Latest | Pulling large weight shards |
Prepare the environment
Create a dedicated Python virtual environment or conda environment and install PyTorch matching your CUDA version. Verify GPU visibility with a quick device check.
Install Transformers
Install Hugging Face Transformers and dependencies. The GLM family relies on remote modeling code, so keep Transformers reasonably current.
Download the model
Pull law-llm/law-glm-10b (or -v2) from the Hugging Face model page. Ensure Git LFS is installed so the ~39.5 GB of weight shards download completely.
Load with trust_remote_code
Load both tokenizer and model with trust_remote_code=True. This executes the repository's custom Python code — only do this from sources you trust, and review the code if operating under strict security policies.
Run a first inference
Send a short Chinese legal question or clause-extraction prompt and confirm the output before scaling to longer documents or batches.
The trust_remote_code parameter is required for GLM-family checkpoints hosted outside the core Transformers library. It is a standard practice for this model family, but enterprise teams should include it in their security review checklist.
Storage, Network, and Data Considerations
Beyond raw compute, plan for storage growth and bandwidth. Each variant is roughly 39.5 GB, and keeping both law-glm-10b and law-glm-10b-v2 doubles that footprint.
- Use an SSD for weights — loading 20+ GB of shards from a spinning disk adds minutes to every startup.
- Reserve Hugging Face cache headroom; partial downloads are the most common cause of corrupted loads.
- A stable broadband connection matters: a failed download at 35 GB wastes hours.
- Keep quantized copies separate from FP16 originals to avoid confusion during evaluation.
Pre-Download Checklist:
- Verify 80+ GB free SSD space for both variants
- Install Git LFS and authenticate with Hugging Face
- Confirm CUDA driver version matches PyTorch build
- Set HF_HOME cache to a drive with adequate space
- Test download of the config and tokenizer before full weights
The model pages list an Apache-2.0 license, so local deployment for research and many commercial uses is permitted — still review the license text on the repository before production integration.
FAQ
Q: Can I run GLM Legal without a GPU?
Yes, but slowly. CPU-only inference of a 10B model works for short prompts with 32–64 GB of system RAM, though generation can take minutes. For any regular use, a GPU with at least 12 GB VRAM (with quantization) is strongly recommended.
Q: What are the GLM Legal system requirements for a single RTX 3090 or 4090?
A 24 GB consumer GPU is the sweet spot. It fits the FP16 weights of law-glm-10b with modest context length, supports batch sizes of 1–4, and handles typical legal question-answering and clause-summarization tasks comfortably.
Q: How much disk space do I need for law-glm-10b and law-glm-10b-v2?
Each variant is approximately 39.5 GB. Budget 50 GB for one variant or 80+ GB if you keep both, including Hugging Face cache overhead and room for quantized copies.
Q: Is trust_remote_code safe to enable for GLM Legal?
It is required for this model family because the GLM architecture code is loaded from the repository rather than the core Transformers library. It is standard practice, but review the repository code or consult your security team before enabling it in regulated environments.