--- license: apache-2.0 --- # BAAI Patent Model (BPM) ## Model Overview **Breaking language barriers in intellectual property innovation.** BAAI Patent Model represents a significant advancement in specialized machine translation, designed specifically for the unique linguistic challenges of patent documentation. Built upon the robust Qwen2.5-7B foundation, this model has been meticulously fine-tuned on an extensive corpus of 15 million professional patent text samples spanning Chinese, English, Japanese, and Korean languages. In the rapidly evolving global innovation landscape, patent documents serve as critical bridges between inventors, researchers, and legal professionals across different linguistic communities. This model empowers organizations to navigate the complex world of international intellectual property with accuracy and fluency, transforming how patent information is accessed, understood, and utilized worldwide. ## Key Features - **🎯 Domain-Specialized Architecture**: Fine-tuned specifically for patent terminology, legal language structures, and technical documentation patterns - **🌏 Multilingual Excellence**: Seamless translation across Chinese, English, Japanese, and Korean language pairs - **📊 High-Quality Training Data**: Trained on 15 million curated professional patent text pairs ensuring authenticity and relevance - **⚡ Production-Ready Performance**: Built on the proven Qwen2.5-7B foundation for reliable, scalable deployment - **📋 Comprehensive Coverage**: Handles complex technical descriptions, legal clauses, and specialized patent terminology ## Model Details - **Base Model**: Qwen2.5-7B - **Model Type**: Causal language model fine-tuned for neural machine translation - **Training Data**: 15 million professional patent text samples (cooperated with [Bayuegua](https://www.bayuegua.com/)) - **Supported Languages**: Chinese (zh), English (en), Japanese (ja), Korean (ko) - **License**: Apache 2.0 - **Parameters**: 7 billion (inherited from base model) ## Performance Metrics The model exhibits strong translation performance across supported language pairs, as measured by BLEU scores and COMET metrics: | Language Direction | BLEU ↑ | COMET ↑ | |--------------------|--------|---------| | zh → en | 36.73 | 0.8389 | | en → zh | 45.04 | 0.8508 | | zh → ja | 36.37 | 0.8673 | | ja → zh | 43.40 | 0.8556 | | zh → ko | 33.37 | 0.8294 | | ko → zh | 40.58 | 0.8412 | ## Quick Start ### Installation ```bash pip install transformers torch ``` (transformers >= 4.52.4) ### Basic Usage ```python import torch from transformers import AutoTokenizer, AutoModelForCausalLM # model path model_name = "patmodels/bpm" # Device and precision settings device = torch.device("cuda" if torch.cuda.is_available() else "cpu") dtype = torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16 # Load tokenizer and model tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype=dtype, trust_remote_code=True ).to(device) # Input example source_lang = "Chinese" target_lang = "English" text = "一种用于图像识别的神经网络架构。" prompt = f"Translate the following text from {source_lang} to {target_lang}:\n\n{text}\n\nTranslation:\n\n" # Tokenize and generate inputs = tokenizer(prompt, return_tensors="pt").to(device) with torch.no_grad(): generated_ids = model.generate( **inputs, max_new_tokens=128, eos_token_id=tokenizer.eos_token_id ) # Decode and print result output_ids = generated_ids[0][len(inputs.input_ids[0]):].tolist() translation = tokenizer.decode(output_ids, skip_special_tokens=True) print("Translation:") print(translation) ``` ## Use Cases ### Potential Applications - **Patent Office Translation**: Streamline patent examination processes across international jurisdictions - **IP Research & Analysis**: Enable comprehensive prior art searches across multilingual patent databases - **Legal Documentation**: Support patent attorneys and IP professionals in cross-border patent prosecution - **Corporate R&D**: Facilitate technology transfer and competitive intelligence across language barriers - **Academic Research**: Enable researchers to access and analyze patent literature in multiple languages ### Dataset Composition - **Size**: 15 million professional patent documents - **Languages**: Balanced representation across Chinese, English, Japanese, and Korean - **Quality**: Professionally translated and validated patent texts - **Domains**: Comprehensive coverage across all major industrial technology domains ## Ethical Considerations This model is designed to assist human translators and IP professionals, not replace human expertise. Users should: - Verify translations for critical legal and technical accuracy - Understand that patent translation often requires specialized legal knowledge - Consider the model as a powerful tool to enhance productivity while maintaining human oversight - Be aware that translation quality may vary based on technical complexity and domain specificity ## Limitations - Performance may vary with highly specialized technical terminology not well-represented in training data - Legal nuances and jurisdiction-specific requirements may require human expert review - The model focuses on the four supported languages (six directions); other language pairs are not supported - Translation of figures, chemical formulas, and mathematical expressions requires special handling ## License This model is released under the Apache 2.0 License, enabling both commercial and non-commercial use with appropriate attribution. ## Acknowledgement This model was developed and fine-tuned by BAAI as part of ongoing research into domain-specific machine translation. The training data—consisting of high-quality parallel corpora in Chinese, English, Japanese, and Korean—was generously provided by Bayuegua. We gratefully acknowledge the contributions of both the model development and data provision teams, whose efforts made this work possible. Special thanks also go to the open-source community and the developers of Qwen base model, which served as the foundation for this multilingual patent translation model. --- *Empowering global innovation through intelligent patent translation.*