Text Generation
Transformers
Safetensors
Chinese
qwen2
counseltraj
counseltrajlm
counseling
conversational
merged
text-generation-inference
Instructions to use UEC-InabaLab/CounselTrajLM-Qwen2.5-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UEC-InabaLab/CounselTrajLM-Qwen2.5-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UEC-InabaLab/CounselTrajLM-Qwen2.5-7B") 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-Qwen2.5-7B") model = AutoModelForCausalLM.from_pretrained("UEC-InabaLab/CounselTrajLM-Qwen2.5-7B", 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-Qwen2.5-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UEC-InabaLab/CounselTrajLM-Qwen2.5-7B" # 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-Qwen2.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/UEC-InabaLab/CounselTrajLM-Qwen2.5-7B
- SGLang
How to use UEC-InabaLab/CounselTrajLM-Qwen2.5-7B 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-Qwen2.5-7B" \ --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-Qwen2.5-7B", "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-Qwen2.5-7B" \ --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-Qwen2.5-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use UEC-InabaLab/CounselTrajLM-Qwen2.5-7B with Docker Model Runner:
docker model run hf.co/UEC-InabaLab/CounselTrajLM-Qwen2.5-7B
Download validation.json from UEC-InabaLab/CounselTrajLM-Qwen2.5-7B: direct link, hf CLI and curl.
- Browser
- Download file 1.6 kB
-
https://huggingface.co/UEC-InabaLab/CounselTrajLM-Qwen2.5-7B/resolve/main/validation.json
- Command line
-
hf download hf://UEC-InabaLab/CounselTrajLM-Qwen2.5-7B/validation.json
-
curl -L -o validation.json https://huggingface.co/UEC-InabaLab/CounselTrajLM-Qwen2.5-7B/resolve/main/validation.json
1.6 kB
| { | |
| "status": "passed", | |
| "format": "merged BF16 safetensors", | |
| "tensor_count": 339, | |
| "parameter_count": 7615616512, | |
| "weight_shards": 9, | |
| "weight_file_bytes": 15231271776, | |
| "weight_sha256": { | |
| "model-00001-of-00009.safetensors": "06006972c3be88e8a44fe21cfe2b0472b130780c781a741f8f90f1fe5ba3aae2", | |
| "model-00002-of-00009.safetensors": "06a23a2bf4b94b7bf50e042756accbf5cbbd677203024673ef7db5c48e7a4659", | |
| "model-00003-of-00009.safetensors": "8032e0bd34b4841af040e3f5f0d7e2223063adcdc5d760fe649640b443458688", | |
| "model-00004-of-00009.safetensors": "05b1c6d9109a5fd42840374b92209bcd695e7cacc096e4484fa57d2ec644d91e", | |
| "model-00005-of-00009.safetensors": "f5fc785d6f68b3a598821d6fec4aca873015bee41d422395722aceecafe18db0", | |
| "model-00006-of-00009.safetensors": "87acd9ee6b4c70082baf793bb63b46a559248fbd7622be83d1e4b50373fd7067", | |
| "model-00007-of-00009.safetensors": "7ba4b9d5db8e730fac79a95d6cdf00be2f0daf28d34cb84aea7bf11103732a24", | |
| "model-00008-of-00009.safetensors": "e4438e286e609366fd28cd020a1f5119b52f62f3ba517894c0db07201e44c88b", | |
| "model-00009-of-00009.safetensors": "4273ecc52f94334cacd0f4a25b402d99386424841915e3c9d8ec02463e8c72ab" | |
| }, | |
| "tokenizer_config_removed_local_flags": [ | |
| "is_local", | |
| "local_files_only" | |
| ], | |
| "source_generation_checks_passed": 3, | |
| "release_inference_check": { | |
| "status": "passed", | |
| "device": "CUDA", | |
| "input": "examples/history.json", | |
| "output": "examples/reply.txt", | |
| "decoding": "greedy", | |
| "max_new_tokens": 128, | |
| "output_characters": 51, | |
| "transformers": "5.13.0", | |
| "torch": "2.5.1+cu121" | |
| } | |
| } | |