Ihteshamstar/qwen3-4b-cuad-extractor

TEXT GENERATIONPricing:Input $0.4 / Cached $0.08 / Output $0.8Concurrent Unit Cost:1Model Size:4BQuant:BF16Context Size:32kTool Calling:SupportedPublished:Sep 13, 2026License:apache-2.0Architecture:Transformer0.0K Open Weights Featherless Exclusive Cold

Ihteshamstar/qwen3-4b-cuad-extractor is a 4 billion parameter Qwen3-Instruct model fine-tuned with QLoRA to extract all 41 CUAD clause types from legal contracts. It excels at identifying and quoting contract text verbatim, returning explicit empty lists for absent clauses. This model achieves a detection F1 of 0.900 and a strict F1 of 0.678, outperforming larger zero-shot models like GPT-4.1 and Qwen3-8B on strict full-span coverage for contract clause extraction.

Loading preview...

Overview

Ihteshamstar/qwen3-4b-cuad-extractor is a specialized 4-billion parameter Qwen3-Instruct model, fine-tuned using QLoRA for the precise task of extracting 41 specific clause types from legal contracts. It operates by quoting contract text verbatim and explicitly indicating absent clauses with empty lists, making it highly suitable for automated contract review.

Key Capabilities

  • High Accuracy Clause Extraction: Achieves a detection F1 score of 0.900 and a strict full-span coverage F1 of 0.678 on the CUAD test set.
  • Efficient Performance: Runs in approximately 2.5 GB of VRAM (q4_K_M GGUF), making it viable on consumer hardware.
  • Single-Pass Extraction: Designed to extract all 41 CUAD clause types in a single call, significantly reducing API calls compared to querying one clause type at a time.
  • Verbatim Quoting: Ensures high fidelity by quoting the exact text from the contract, with a verbatim rate of 97.2%.
  • Outperforms Larger Models: Surpasses zero-shot GPT-4.1 and Qwen3-8B in strict F1 for full-span coverage on contract clause extraction.

Good For

  • Automated Contract Review: Ideal for developers building systems that need to quickly identify and extract specific clauses from English-language commercial contracts, particularly those similar to SEC EDGAR filings.
  • Legal Tech Applications: Useful for applications requiring structured data extraction from legal documents for analysis or compliance.
  • Resource-Constrained Environments: Its efficient memory footprint allows for local deployment on consumer-grade hardware using tools like Ollama or Hugging Face Transformers.

Limitations

  • Strict-coverage recall: May not always capture every single occurrence when a clause is stated in multiple places.
  • Greedy Decoding Issues: Can occasionally enter repetition loops on dense text chunks, requiring retry with adjusted repeat_penalty.
  • Domain Specificity: Performance is validated on English-language commercial contracts (CUAD dataset); performance on other contract styles, languages, or non-contract legal text is not guaranteed.