56 lines
1.5 KiB
Markdown
56 lines
1.5 KiB
Markdown
|
|
---
|
|||
|
|
license: apache-2.0
|
|||
|
|
tags:
|
|||
|
|
- transformers
|
|||
|
|
- safetensors
|
|||
|
|
- llama
|
|||
|
|
- hebei-tourism
|
|||
|
|
- deepseek
|
|||
|
|
tasks:
|
|||
|
|
- text-generation
|
|||
|
|
- hebei-tourism
|
|||
|
|
- deepseek
|
|||
|
|
widgets:
|
|||
|
|
- enable: true
|
|||
|
|
version: 1
|
|||
|
|
task: text-generation
|
|||
|
|
inputs:
|
|||
|
|
- type: text
|
|||
|
|
displayType: TextArea
|
|||
|
|
name: input_text
|
|||
|
|
validator:
|
|||
|
|
max_words: 128
|
|||
|
|
displayProps:
|
|||
|
|
label: 输入文本
|
|||
|
|
placeholder: 请输入要处理的文本,例如‘推荐河北的旅游景点’
|
|||
|
|
output:
|
|||
|
|
displayType: Text
|
|||
|
|
displayValueMapping: text
|
|||
|
|
examples:
|
|||
|
|
- inputs:
|
|||
|
|
- data: 推荐河北的旅游景点
|
|||
|
|
- inputs:
|
|||
|
|
- data: 河北有哪些历史文化名城
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# 河北旅游DeepSeek 模型
|
|||
|
|
|
|||
|
|
这是一个基于 `deepseek-ai/deepseek-coder-6.7b-base` 微调的文本生成模型,专门用于推荐河北旅游相关的景点、文化名城等。
|
|||
|
|
|
|||
|
|
## 模型用途
|
|||
|
|
- **模型框架**:`transformers` 库,支持文本生成。
|
|||
|
|
- **支持任务**:文本生成(`text-generation`)。
|
|||
|
|
|
|||
|
|
## 使用方法
|
|||
|
|
你可以使用 `transformers` 库加载模型:
|
|||
|
|
|
|||
|
|
```python
|
|||
|
|
from modelscope import AutoModelForCausalLM, AutoTokenizer
|
|||
|
|
|
|||
|
|
model = AutoModelForCausalLM.from_pretrained("jinvbar/hebei-tourism-deepseek")
|
|||
|
|
tokenizer = AutoTokenizer.from_pretrained("jinvbar/hebei-tourism-deepseek")
|
|||
|
|
|
|||
|
|
input_text = "介绍一下河北的旅游景点"
|
|||
|
|
inputs = tokenizer(input_text, return_tensors="pt")
|
|||
|
|
outputs = model.generate(**inputs, max_length=200)
|
|||
|
|
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|