Instructions to use Duxiaoman-DI/XuanYuan-13B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Duxiaoman-DI/XuanYuan-13B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Duxiaoman-DI/XuanYuan-13B-Chat")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Duxiaoman-DI/XuanYuan-13B-Chat") model = AutoModelForCausalLM.from_pretrained("Duxiaoman-DI/XuanYuan-13B-Chat") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Duxiaoman-DI/XuanYuan-13B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Duxiaoman-DI/XuanYuan-13B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Duxiaoman-DI/XuanYuan-13B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Duxiaoman-DI/XuanYuan-13B-Chat
- SGLang
How to use Duxiaoman-DI/XuanYuan-13B-Chat 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 "Duxiaoman-DI/XuanYuan-13B-Chat" \ --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": "Duxiaoman-DI/XuanYuan-13B-Chat", "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 "Duxiaoman-DI/XuanYuan-13B-Chat" \ --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": "Duxiaoman-DI/XuanYuan-13B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Duxiaoman-DI/XuanYuan-13B-Chat with Docker Model Runner:
docker model run hf.co/Duxiaoman-DI/XuanYuan-13B-Chat
介绍
XuanYuan-13B是基于Llama2-13B模型进行中文增强的金融大模型,包含大量中英文语料增量预训练之后的底座模型以及使用高质量指令数据和强化学习进行对齐的chat模型。XuanYuan-13B的推出标志着智能金融领域的一次新的突破,它可以在日常对话、语言理解、知识运用、内容创作、信息摘要等方面与70B量级模型相媲美。在模型训练中,团队在模型预训练阶段动态调整不同语种与领域知识的比例,融入了大量的专业金融语料,并在指令微调中灵活运用之前提出的Self-QA和混合训练方法,显著提升了模型在对话中的性能表现。随着XuanYuan-13B的推出,金融领域的智能化水平将迈上一个新的台阶。它将为金融机构、投资者、研究人员等提供更准确、及时的信息,并帮助他们做出更明智的决策。同时,轩辕13B也将成为金融教育和普及的有力工具,为广大民众提供可靠的金融知识和建议。随着时间的推移,团队将继续不断改进和优化这个模型,以满足不断发展的金融领域需求。通过不断学习和适应,轩辕13B将成为一个真正可靠且强大的金融智能伙伴,为用户带来更多惊喜和价值。
- Downloads last month
- 31