Text Generation
Transformers
Safetensors
Chinese
qwen3_5_text
qwen3_5
merged
psychological-counseling
counselor-response-generation
conversational
Instructions to use UEC-InabaLab/CounselTrajLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UEC-InabaLab/CounselTrajLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UEC-InabaLab/CounselTrajLM") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("UEC-InabaLab/CounselTrajLM") model = AutoModelForCausalLM.from_pretrained("UEC-InabaLab/CounselTrajLM", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use UEC-InabaLab/CounselTrajLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UEC-InabaLab/CounselTrajLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UEC-InabaLab/CounselTrajLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/UEC-InabaLab/CounselTrajLM
- SGLang
How to use UEC-InabaLab/CounselTrajLM 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 "UEC-InabaLab/CounselTrajLM" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UEC-InabaLab/CounselTrajLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "UEC-InabaLab/CounselTrajLM" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UEC-InabaLab/CounselTrajLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use UEC-InabaLab/CounselTrajLM with Docker Model Runner:
docker model run hf.co/UEC-InabaLab/CounselTrajLM
File size: 2,171 Bytes
9f553e1 15b53fd 9203391 9f553e1 9203391 9f553e1 9203391 9f553e1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a LICENSE
00c46c8cbd51f5d1ea2dfeca6732de9cf18e017cbcd40da62169b842cdff6715 README.md
a4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715 chat_template.jinja
77c837fe7366ccbd656a6cce7ba0f8fcdbb82c505975b9c758bb2e330423173e config.json
72b038eb2dd906df9d8efaf5d637a844840fc2547c1a2f2dffa13644d488adac examples/histories.jsonl
cd650bc16ac1d4f4a16607d1c3a6345ae53aad1350d847ee96ce781dac816a5f examples/replies.jsonl
a3b86ea598c81ee3c42c41aa54469906a5700fbbfedb0b1c5ae509d94430c170 generate_reply.py
8e29eeb222454c2a417b17547a84aee206c110a033418b7c0342cd75e75d92a0 generation_config.json
dd63614f1dc80dce2d83be3f3e69af1f8a0ebc8add9b8e0abf3910f563e44344 model-00001-of-00010.safetensors
856617f65c8f2d2686c0aec3c6036c9bf53466ed6c90275bee6d0ecaa8263b30 model-00002-of-00010.safetensors
e956a1f8536baf45076db19dffb96f258a6d94fe0a545f2bb38fed9517ab19a0 model-00003-of-00010.safetensors
847db00981824e02e112fa1f57526d1feebfa268d1e85c32c1e24b9d4641afc7 model-00004-of-00010.safetensors
5c13aa2a1fe366710e1dcd1484901e7725afdde55b2c717a2a25797d93b75058 model-00005-of-00010.safetensors
6c65097043a90de2d46d0d01d698ef1a32bde00a3baf458434ffbf0906254a31 model-00006-of-00010.safetensors
7de8c454f2661fd3f6e6a7c0a46dc8e6915a34caf3fac961b895b306d64b89b9 model-00007-of-00010.safetensors
293d1a770da768e17860c9915a55ea26d178067d118cfdbdc2c285577dc21b87 model-00008-of-00010.safetensors
9d99b5f3e4bff23afe10799d21ca22eb6e866cbd17a78428e6e4da6fb8466211 model-00009-of-00010.safetensors
d420fe217cc622433d5ec2bb1620ea34eaf4a4561e3a55b69cbe8856b17705dc model-00010-of-00010.safetensors
2e1e25b0bacb71b1a4d670f12ed93c8790619bf5bef77a5739a017b1e3940f95 model.safetensors.index.json
d733550091085c313f62d2af14323484d3183e78b3e1fdb41de91dcbe5232cd7 model_details.json
338ccf69cc3501c68ac17595e7206fbc8c53ab700bd8f8ab051ccd1ed879786b requirements.txt
f399b3cd12fa270d51457bb749fb30863521e8359b8a27059c71b6c2f7d6dd6c tokenizer.json
91a08f825d370d085d692e04cf117cdd7faad7bf18e996f1e6031b6dab03db72 tokenizer_config.json
afae503c250b36b28b194f811664147dac18f38ae59a2e463c9c4eaca9269361 validation.json
|