Instructions to use ThornRugal/DSDescription with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ThornRugal/DSDescription with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ThornRugal/DSDescription")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ThornRugal/DSDescription") model = AutoModelForCausalLM.from_pretrained("ThornRugal/DSDescription") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ThornRugal/DSDescription with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ThornRugal/DSDescription" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ThornRugal/DSDescription", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ThornRugal/DSDescription
- SGLang
How to use ThornRugal/DSDescription with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ThornRugal/DSDescription" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ThornRugal/DSDescription", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ThornRugal/DSDescription" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ThornRugal/DSDescription", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ThornRugal/DSDescription with Docker Model Runner:
docker model run hf.co/ThornRugal/DSDescription
目标是能够输入物品的前半段描述,让模型输出一个相关的背景故事
可以使用以下的例子作为参考输入:
被称为“邪妖”的剑,随着斩杀敌人数量的增多而变强。
伊扎里斯咒术中最为可怖的一个。牺牲自己的生命将身躯化为火焰钻入敌人身体内部
被称为“干将”与“莫邪”的对剑,是由有名的剑匠夫妇为暴君打造
被人们冠以“正义”的剑,能够驱散黑暗并治疗自身
详细的过程可以看CSDN链接:https://blog.csdn.net/thorn_r/article/details/137139136
受作者技术力限制、物品描述段落过短等一系列限制,模型效果可能不理想还有可能“说胡话”,还望各位海涵
- Downloads last month
- 5