我们目前公开的最新版本Lawyer LLaMA是:
- Lawyer LLaMA 2 (
lawyer-llama-13b-v2
): 以quzhe/llama_chinese_13B为底座,使用通用instruction和法律instruction进行SFT,配有婚姻相关法律检索模块。
建议使用Python 3.8及以上版本。
主要依赖库如下:
transformers
>= 4.28.0 注意:检索模块需要使用transformers <= 4.30sentencepiece
>= 0.1.97gradio
-
从HuggingFace下载 **Lawyer LLaMA 2 (
lawyer-llama-13b-v2
)**模型参数。 -
从HuggingFace下载法条检索模块,并运行其中的
python server.py
启动法条检索服务,默认挂在9098端口。
python demo_cmd.py \
--checkpoint /path/to/model \
--classifier_url "http://127.0.0.1:9098/check_hunyin" \
--use_chat_mode
运行以下命令启动交互网页,访问http://127.0.0.1:7863
。
python demo_web.py \
--port 7863 \
--checkpoint /path/to/model \
--classifier_url "http://127.0.0.1:9098/check_hunyin"
如需使用nginx反向代理访问此服务,可参考https://github.com/LeetJoe/lawyer-llama/blob/main/demo/nginx_proxy.md (Credit to @LeetJoe)