Instructions to use OEvortex/EMO-phi-128k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OEvortex/EMO-phi-128k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OEvortex/EMO-phi-128k", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OEvortex/EMO-phi-128k", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("OEvortex/EMO-phi-128k", trust_remote_code=True) 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
- vLLM
How to use OEvortex/EMO-phi-128k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OEvortex/EMO-phi-128k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OEvortex/EMO-phi-128k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OEvortex/EMO-phi-128k
- SGLang
How to use OEvortex/EMO-phi-128k 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 "OEvortex/EMO-phi-128k" \ --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": "OEvortex/EMO-phi-128k", "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 "OEvortex/EMO-phi-128k" \ --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": "OEvortex/EMO-phi-128k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OEvortex/EMO-phi-128k with Docker Model Runner:
docker model run hf.co/OEvortex/EMO-phi-128k
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("OEvortex/EMO-phi-128k", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("OEvortex/EMO-phi-128k", trust_remote_code=True)
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]:]))EMO-phi-128k
EMO-phi-128k is an emotional intelligence conversational AI model fine-tuned from Microsoft's Phi-3-mini-128k-instruct model. It is designed to engage in open-ended dialogue while exhibiting emotional understanding and emotional intelligence capabilities.
Model Details
- Developer: OEvortex
- Model Type: Transformer-based language model
- Language: English
- License: MIT
- Base Model: microsoft/Phi-3-mini-128k-instruct
Model Description
EMO-phi-128k is a 128k parameter conversational AI model that has been fine-tuned to incorporate emotional intelligence and emotional understanding capabilities. It aims to engage in emotionally aware and contextual dialogue by recognizing and responding appropriately to the emotional tones and sentiments expressed by the user.
While inheriting the strong language understanding and generation capabilities of its base model, EMO-phi-128k has been specifically optimized for emotional intelligence tasks through additional fine-tuning on emotional dialogue datasets.
Intended Uses
- Emotional Support / Conversational Companion
- Customer Service Chatbots (with emotional intelligence)
- Creative Writing Assistance (with emotional awareness)
- Psychological/Therapeutic Applications
Limitations and Risks
As an AI system, EMO-phi-128k may exhibit biases present in its training data. Its true emotional intelligence capabilities are not fully known or verified. The model should be used with caution, especially in sensitive or high-stakes applications involving mental health, therapy, or counseling. Proper human oversight is recommended.
Additionally, like all language models, EMO-phi-128k is susceptible to generating harmful, biased, or explicit content if prompted in an unsafe manner. Safety considerations should be taken into account when deploying or interacting with the model.
How to Use
You can load and use the EMO-phi-128k model with the Transformers library in Python:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
torch.random.manual_seed(0)
model = AutoModelForCausalLM.from_pretrained(
"OEvortex/EMO-phi-128k",
device_map="cuda",
torch_dtype="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct")
messages = [
{"role": "system", "content": "You are a helpful Emotional intelligence named as EMO-phi, remember to always answer users question in EMO style."},
{"role": "user", "content": "My best friend recently lost their parent to cancer after a long battle. They are understandably devastated and struggling with grief."},
]
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
)
generation_args = {
"max_new_tokens": 500,
"return_full_text": False,
"temperature": 0.6,
"do_sample": True,
}
output = pipe(messages, **generation_args)
print(output[0]['generated_text'])
- Downloads last month
- 30
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OEvortex/EMO-phi-128k", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)