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
Document public model access
Browse files- README.md +1 -3
- SHA256SUMS +1 -1
README.md
CHANGED
|
@@ -80,12 +80,10 @@ for the source-specific data terms.
|
|
| 80 |
|
| 81 |
## Generate a reply
|
| 82 |
|
| 83 |
-
|
| 84 |
-
the complete model and run the included example:
|
| 85 |
|
| 86 |
```bash
|
| 87 |
pip install huggingface_hub
|
| 88 |
-
hf auth login
|
| 89 |
python -c 'from huggingface_hub import snapshot_download; snapshot_download("UEC-InabaLab/CounselTrajLM", local_dir="CounselTrajLM")'
|
| 90 |
cd CounselTrajLM
|
| 91 |
pip install -r requirements.txt
|
|
|
|
| 80 |
|
| 81 |
## Generate a reply
|
| 82 |
|
| 83 |
+
Download the public complete model and run the included example:
|
|
|
|
| 84 |
|
| 85 |
```bash
|
| 86 |
pip install huggingface_hub
|
|
|
|
| 87 |
python -c 'from huggingface_hub import snapshot_download; snapshot_download("UEC-InabaLab/CounselTrajLM", local_dir="CounselTrajLM")'
|
| 88 |
cd CounselTrajLM
|
| 89 |
pip install -r requirements.txt
|
SHA256SUMS
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a LICENSE
|
| 2 |
-
|
| 3 |
a4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715 chat_template.jinja
|
| 4 |
77c837fe7366ccbd656a6cce7ba0f8fcdbb82c505975b9c758bb2e330423173e config.json
|
| 5 |
72b038eb2dd906df9d8efaf5d637a844840fc2547c1a2f2dffa13644d488adac examples/histories.jsonl
|
|
|
|
| 1 |
bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a LICENSE
|
| 2 |
+
00c46c8cbd51f5d1ea2dfeca6732de9cf18e017cbcd40da62169b842cdff6715 README.md
|
| 3 |
a4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715 chat_template.jinja
|
| 4 |
77c837fe7366ccbd656a6cce7ba0f8fcdbb82c505975b9c758bb2e330423173e config.json
|
| 5 |
72b038eb2dd906df9d8efaf5d637a844840fc2547c1a2f2dffa13644d488adac examples/histories.jsonl
|