初始化项目,由ModelHub XC社区提供模型
Model: phamthanhfd/contract-analysis-qwen2.5-3b Source: Original Platform
This commit is contained in:
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
language:
|
||||
- en
|
||||
license: apache-2.0
|
||||
base_model: Qwen/Qwen2.5-3B-Instruct
|
||||
tags:
|
||||
- legal
|
||||
- contract-analysis
|
||||
- qwen2.5
|
||||
- text-generation
|
||||
datasets:
|
||||
- theatticusproject/cuad-qa
|
||||
pipeline_tag: text-generation
|
||||
---
|
||||
|
||||
# Contract Analysis — Qwen2.5-3B (Merged)
|
||||
|
||||
> LoRA adapter nhẹ hơn: [phamthanhfd/contract-analysis-lora-adapter](https://huggingface.co/phamthanhfd/contract-analysis-lora-adapter)
|
||||
|
||||
## Quick Start
|
||||
|
||||
```python
|
||||
from transformers import pipeline
|
||||
pipe = pipeline("text-generation", model="phamthanhfd/contract-analysis-qwen2.5-3b", device_map="auto")
|
||||
messages = [
|
||||
{"role":"system","content":"You are a legal contract expert. Return JSON with category and summary."},
|
||||
{"role":"user","content":"Analyze: The employee shall not disclose confidential information."}
|
||||
]
|
||||
result = pipe(messages, max_new_tokens=150, temperature=0.1)
|
||||
print(result[0]["generated_text"][-1]["content"])
|
||||
```
|
||||
Reference in New Issue
Block a user