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
Download validation.json from UEC-InabaLab/CounselTrajLM: direct link, hf CLI and curl.
- Browser
- Download file 836 Bytes
-
https://huggingface.co/UEC-InabaLab/CounselTrajLM/resolve/341e9b198c985ee75c982a43376015d806b15522/validation.json
- Command line
-
hf download hf://UEC-InabaLab/CounselTrajLM@341e9b198c985ee75c982a43376015d806b15522/validation.json
-
curl -L -o validation.json https://huggingface.co/UEC-InabaLab/CounselTrajLM/resolve/341e9b198c985ee75c982a43376015d806b15522/validation.json
836 Bytes
| { | |
| "adapter_sha256": "c4d89ce3b6cfdb53dba2927683331e2182c8767f3380527a78f0533b0f31e5bd", | |
| "matches_source_final_adapter": true, | |
| "adapter_tensors": 256, | |
| "adapter_parameters": 58195968, | |
| "all_tensors_finite": true, | |
| "base_revision": "c202236235762e1c871ad0ccb60c8ee5ba337b9a", | |
| "base_revision_verified_on_hub": true, | |
| "model_card_and_python_syntax_validated": true, | |
| "original_system_prompt_verified": true, | |
| "gpu_smoke_test": { | |
| "passed": true, | |
| "examples": 3, | |
| "input": "examples/histories.jsonl", | |
| "output": "examples/replies.jsonl", | |
| "nonempty_responses": 3, | |
| "thinking_enabled": false, | |
| "quantization": "NF4 double quantization", | |
| "max_new_tokens": 128, | |
| "torch": "2.5.1+cu121", | |
| "transformers": "5.13.0", | |
| "peft": "0.19.1", | |
| "accelerate": "1.13.0", | |
| "bitsandbytes": "0.49.2" | |
| } | |
| } | |