🚀 Equall/Saul-Instruct-v1
Equall/Saul-Instruct-v1是一款專門為法律領域定製的大型指令語言模型。它通過對Mistral - 7B進行持續預訓練而得到,能有效處理法律相關的生成任務。
訪問我們的網站並註冊:https://equall.ai/

🚀 快速開始
你可以使用此模型處理涉及生成的法律用例。以下是如何使用🤗 Transformers庫中的pipeline()
函數來運行該模型的示例:
import torch
from transformers import pipeline
pipe = pipeline("text-generation", model="Equall/Saul-Instruct-v1", torch_dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "user", "content": "[YOUR QUERY GOES HERE]"},
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipe(prompt, max_new_tokens=256, do_sample=False)
print(outputs[0]["generated_text"])
✨ 主要特性
- 專為法律領域定製,能更好地處理法律相關的生成任務。
- 基於Mistral - 7B進行持續預訓練,繼承了其優秀的語言處理能力。
📦 安裝指南
若使用的transformers版本 <= v4.34,需要從源代碼安裝transformers:
pip install git+https://github.com/huggingface/transformers.git
同時,需要安裝accelerate
:
pip install accelerate
💻 使用示例
基礎用法
import torch
from transformers import pipeline
pipe = pipeline("text-generation", model="Equall/Saul-Instruct-v1", torch_dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "user", "content": "[YOUR QUERY GOES HERE]"},
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipe(prompt, max_new_tokens=256, do_sample=False)
print(outputs[0]["generated_text"])
📚 詳細文檔
模型詳情
模型描述
這是一個已發佈在Hugging Face Hub上的🤗 transformers模型的卡片,該模型卡片是自動生成的。
屬性 |
詳情 |
開發者 |
Equall.ai與CentraleSupelec、Sorbonne Université、Instituto Superior Técnico和NOVA School of Law合作開發 |
模型類型 |
7B |
語言(NLP) |
英語 |
許可證 |
MIT |
模型來源
- 論文:https://arxiv.org/abs/2403.03883
偏差、風險和侷限性
此模型基於大語言模型(LLM)技術構建,存在固有的侷限性。它偶爾可能會生成不準確或無意義的輸出。此外,作為一個7B的模型,預計其性能不如更大的模型,如70B的變體。
引用
BibTeX:
@misc{colombo2024saullm7b,
title={SaulLM-7B: A pioneering Large Language Model for Law},
author={Pierre Colombo and Telmo Pessoa Pires and Malik Boudiaf and Dominic Culver and Rui Melo and Caio Corro and Andre F. T. Martins and Fabrizio Esposito and Vera Lúcia Raposo and Sofia Morgado and Michael Desa},
year={2024},
eprint={2403.03883},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
📄 許可證
本模型採用MIT許可證。