Instructions to use Psychotherapy-LLM/PsyCoPref-Llama3-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Psychotherapy-LLM/PsyCoPref-Llama3-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Psychotherapy-LLM/PsyCoPref-Llama3-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Psychotherapy-LLM/PsyCoPref-Llama3-8B") model = AutoModelForCausalLM.from_pretrained("Psychotherapy-LLM/PsyCoPref-Llama3-8B") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Psychotherapy-LLM/PsyCoPref-Llama3-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Psychotherapy-LLM/PsyCoPref-Llama3-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Psychotherapy-LLM/PsyCoPref-Llama3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Psychotherapy-LLM/PsyCoPref-Llama3-8B
- SGLang
How to use Psychotherapy-LLM/PsyCoPref-Llama3-8B 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 "Psychotherapy-LLM/PsyCoPref-Llama3-8B" \ --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": "Psychotherapy-LLM/PsyCoPref-Llama3-8B", "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 "Psychotherapy-LLM/PsyCoPref-Llama3-8B" \ --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": "Psychotherapy-LLM/PsyCoPref-Llama3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Psychotherapy-LLM/PsyCoPref-Llama3-8B with Docker Model Runner:
docker model run hf.co/Psychotherapy-LLM/PsyCoPref-Llama3-8B
License Conflict: llama3.1 vs CC BY-NC 4.0
Hi, I’d like to report a potential license conflict in Psychotherapy-LLM/PsychoCounsel-Llama3-8B. According to the model card, it appears that part of the training data used for this model comes from datasets licensed under Creative Commons Attribution-NonCommercial 4.0 (CC BY-NC 4.0). This combination introduces a potential license compatibility issue, since LLaMA 3.1 strictly regulates redistribution and sublicensing, while CC BY-NC 4.0 imposes a NonCommercial restriction and attribution requirement that may propagate to derivative works.
⚠️ Key incompatibilities:
LLaMA 3.1 – Section 2 (Sublicensing and Relicensing):
• Does not allow relicensing under other licenses (e.g., CC BY-NC)
• Requires derivative models to preserve original terms and restrictions
• Commercial use is restricted based on MAU thresholds
CC BY-NC 4.0 – Core Clauses:
• Prohibits any commercial use of the dataset or derivative works
• Requires clear attribution to dataset creators
• Intended to propagate “non-commercial only” conditions to downstream outputs
Using CC BY-NC 4.0 data to train a model that is then distributed under LLaMA 3.1, without acknowledging or preserving the CC license conditions, may result in downstream confusion about:
• Whether commercial use is allowed (Meta's license restricts, but not exactly the same way)
• Whether attribution is required for the training data
• Whether a LLaMA-licensed model can legally incorporate and redistribute outputs from a CC BY-NC–licensed dataset
While both licenses limit commercial use in different ways, the real conflict lies in how derivative rights are managed:
LLaMA 3.1 disallows relicensing and requires that its terms remain intact;
CC BY-NC 4.0 requires non-commercial terms to be inherited by derivative works.
This may create an incompatibility, as it's impossible to fully comply with both licenses simultaneously.
🔹 Suggestion:
To better align the licensing structure and ensure full compliance, a few possible steps could be helpful:
1. Add a clear attribution line in the README or model card for the datasets used under CC BY-NC 4.0, including links to the dataset sources.
2. Clarify in the documentation that use of the model is also subject to the non-commercial restrictions of the training data, and not just LLaMA 3.1.
3. Consider re-evaluating the licensing arrangement if full CC BY-NC 4.0 obligations (e.g., non-commercial propagation) are incompatible with the current release.
4. For downstream clarity, state explicitly whether the model can be used commercially and under what terms.
Hope this helps! Let me know if you have any questions or need more info.
Thanks for your attention!
Looking forward to your response!
Hi, I've changed the lisence to CC BY-NC 4.0.
Best