Instructions to use TriadParty/Deepsword-34B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TriadParty/Deepsword-34B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TriadParty/Deepsword-34B-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TriadParty/Deepsword-34B-Base") model = AutoModelForCausalLM.from_pretrained("TriadParty/Deepsword-34B-Base") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TriadParty/Deepsword-34B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TriadParty/Deepsword-34B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TriadParty/Deepsword-34B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TriadParty/Deepsword-34B-Base
- SGLang
How to use TriadParty/Deepsword-34B-Base 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 "TriadParty/Deepsword-34B-Base" \ --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": "TriadParty/Deepsword-34B-Base", "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 "TriadParty/Deepsword-34B-Base" \ --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": "TriadParty/Deepsword-34B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TriadParty/Deepsword-34B-Base with Docker Model Runner:
docker model run hf.co/TriadParty/Deepsword-34B-Base
Training data language?
I noticed the public dataset for the instruction tuning seems to be Chinese only, but the description implied there is some English as well.
Does the trained base model have both?
For the base model. it was trained in this: https://huggingface.co/datasets/TriadParty/deepsword
There are also some English detective novels, but most of them were published in the past two years. I think this involves some copyright issues, so the data set has not been published.
Ah yeah I was mistaken, thats what I saw. It does seem to be mostly chinese.
I wonder how well that extrapolates to english martial arts writing...
Ah yeah I was mistaken, thats what I saw. It does seem to be mostly chinese.
I wonder how well that extrapolates to english martial arts writing...
I think there are some commonalities between them, but there may be some differences in the way of expression. In fact, I am also considering publishing a second edition recently. Some students who play games are very interested in this. If you are also interested, we can train together, hahaha
Mmm, well this is interesting to me, but I'm probably not much help? The real sticking point would be finding English martial arts literature in the first place.
I would suggest slapping unsloth into the training script if you don't already, should significantly speed things up and allow for higher contexts : https://github.com/unslothai/unsloth