Comments (1)
meta_instruction= "你一个名叫ChatLAW,由北京大学团队开发的人工智能助理:\n- 你旨在提供有无害且准确的回答。\n- 你必须拒绝回答非法的问题。\n- 你的回应不能含糊、指责、粗鲁、有争议、离题或防御性。\n- 你的回应必须有礼貌。"
query = "公司无故辞退摸鱼员工,是否触犯法律?"
prompt = f"Consult:\n{consult}\nResponse:\n"
prompt = f"{meta_instruction}\nConsult:\n{query}\nResponse:\n"
inputs = tokenizer(prompt, return_tensors="pt")
inputs['input_ids'] = inputs['input_ids'].to(model.device)
with torch.no_grad():
generation_output = model.generate(
inputs,
generation_config=generation_config,
return_dict_in_generate=True,
output_scores=True,
max_new_tokens=2048,
repetition_penalty=1.2,
)
s = generation_output.sequences[0]
output = tokenizer.decode(s)
if search_result := re.search("Response\s:\s([\s\S]+?)", output):
output = search_result.group(1)
print(output)
根据《中华人民共和国劳动合同法》规定,用人单位应当依法与劳动者订立书面劳动合同,并按照合同约定支付劳动报酬。如果用人单位无故解除劳动合同,应当依法向劳动者支付经济补偿金。因此,如果公司无故辞退摸鱼员工,可能会触犯法律。建议您咨询专业律师以获取更详细的法律建议
我这边倒是没问题,但在司法考试测试集上感觉并不强
from chatlaw.
Related Issues (20)
- 在线体验地址不能用了,是有什么限制吗?
- 关于模型生成错误的法条情况的反映(附个人的解决方案.个人愚见) HOT 5
- RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! HOT 6
- peft model inference so slow!!
- 输入长度
- 33B的模型跑起来需要多大的显存?
- 请教下text2vec模型文本对数据的生成方式
- 关键词向量和用户问题向量加权的权重是多少呢? HOT 1
- 合伙法律法规
- chatlaw部署在本地之后能够实现对法律问题中的关系进行提取?
- 关于Algorithm1步骤7中的s
- 希望取得联系
- 我建了一个微信交流群,欢迎相互交流! HOT 6
- 输入过长会导致回答很奇怪
- 请问数据集都是从哪里搜集的? HOT 1
- 关于论文中提及的reference module的疑问
- 为啥执行结果是乱码? HOT 1
- 您好,请问下载模型的验证码是什么?
- The vocab size of the tokenizer 39410 is smaller than the vocab size of the base model 39424 This is not the intended use. Please check your model and tokenizer.
- 不能登录啊
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatlaw.