Deep Seek-Fake-News LLM

DeepSeekFakeNews-LLM

Project Link👁️ Lab Link👁️

1. Introduction of Deep Seek-Fake-News LLM

2. Model Summary

deepseekfakenews-llm-7b-chat is a 7B parameter model initialized from deepseek-llm-7b-chat and fine-tuned on extra fake news instruction data.

Chat with DeepSeekFakeNews-LLM

3. How to Use

Here are some examples of how to use our model.

import torch
from peft import PeftModel
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig

model_name = "zt-ai/DeepSeekFakeNews-llm-7b-chat"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
model.generation_config = GenerationConfig.from_pretrained(model_name)
model.generation_config.pad_token_id = model.generation_config.eos_token_id
lora_model = PeftModel.from_pretrained(base_model, model_name)


messages = [
    {
"role": "user",
"content":
"""假新闻的表现可以总结为以下几个方面:1. 逻辑和事实矛盾。2.断章取义和误导性信息。3.夸张标题和吸引眼球的内容。4.情绪化和极端语言。5.偏见和单一立场。请从这几个方面分析新闻的真实性(真新闻或假新闻):
发布时间:
新闻标题:
新闻内容:
"""}
]
input_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
outputs = model.generate(input_tensor.to(model.device), max_new_tokens=100)

result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)
print(result)

Avoiding the use of the provided function apply_chat_template, you can also interact with our model following the sample template. Note that messages should be replaced by your input.

User: {messages[0]['content']}

Assistant: 

Note: By default (add_special_tokens=True), our tokenizer automatically adds a bos_token (<|begin▁of▁sentence|>) before the input text. Additionally, since the system prompt is not compatible with this version of our models, we DO NOT RECOMMEND including the system prompt in your input.

4. License

This code repository is licensed under the MIT License. The use of DeepSeekFakeNews-LLM models is subject to the Model License. DeepSeekFakeNews-LLM supports commercial use.

5. Contact

If you have any questions, please raise an issue or contact us at [email protected] or [email protected].

Downloads last month
6
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.

Model tree for zt-ai/DeepSeekFakeNews-LLM-7B-Chat

Finetuned
(9)
this model
Quantizations
2 models