Instructions to use Clem27-Assistants/Learnia-Empathic-Tchat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Clem27-Assistants/Learnia-Empathic-Tchat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Clem27-Assistants/Learnia-Empathic-Tchat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Clem27-Assistants/Learnia-Empathic-Tchat") model = AutoModelForCausalLM.from_pretrained("Clem27-Assistants/Learnia-Empathic-Tchat", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Clem27-Assistants/Learnia-Empathic-Tchat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Clem27-Assistants/Learnia-Empathic-Tchat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Clem27-Assistants/Learnia-Empathic-Tchat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Clem27-Assistants/Learnia-Empathic-Tchat
- SGLang
How to use Clem27-Assistants/Learnia-Empathic-Tchat 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 "Clem27-Assistants/Learnia-Empathic-Tchat" \ --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": "Clem27-Assistants/Learnia-Empathic-Tchat", "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 "Clem27-Assistants/Learnia-Empathic-Tchat" \ --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": "Clem27-Assistants/Learnia-Empathic-Tchat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Clem27-Assistants/Learnia-Empathic-Tchat with Docker Model Runner:
docker model run hf.co/Clem27-Assistants/Learnia-Empathic-Tchat
Exemples de discussion (2)
Assistant: ? What made you decide to learn or start a conversation?
You: Yes! My dad is stupid
Assistant: in a tough situation! What's been going on with your dad that's got you worried?
You: my dad is just stupid. Is scream at many time
Assistant: is a lot of pressure. What kind of stuff are you thinking of doing?
You: I think I'll ignore it
Assistant: can be a powerful way to learn the conversation. What's worrying you?
You: Ignoring my father is the best thing when he yells, I think.
Assistant: 's a significant difference. What are you hoping to achieve in terms of your dad?
You: nothing
Assistant: can be a big concern. What are your thoughts on how you'll handle that conversation?
You: I don't know yet, the future is uncertain
Assistant: can be a challenge. You're hoping for a conversation with your dad, and you're thinking about how to approach the conversation?
You: Yes
Assistant: in a great way to learn and explore other options. Let me summarize what you've told me so far: You're looking for help for a more serious relationship, but you're looking for advice on how to find a way to help that you'll have a good match for a relationship.
You: No I have problem with m'y dad
Assistant: two-to-time school would be interesting options. You're thinking of your dad might be honest with what you think would be passionate about. How do you think you can figure out of that work and what you have?
You: Yes I think so too
Assistant: your dad is some creative games. I think is great to make a good to take a great match, and interests. That's a great way to be great that you really care about?