Instructions to use Phoenix21/fine-tuned-meditation-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Phoenix21/fine-tuned-meditation-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Phoenix21/fine-tuned-meditation-model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Phoenix21/fine-tuned-meditation-model") model = AutoModelForCausalLM.from_pretrained("Phoenix21/fine-tuned-meditation-model") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Phoenix21/fine-tuned-meditation-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Phoenix21/fine-tuned-meditation-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Phoenix21/fine-tuned-meditation-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Phoenix21/fine-tuned-meditation-model
- SGLang
How to use Phoenix21/fine-tuned-meditation-model 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 "Phoenix21/fine-tuned-meditation-model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Phoenix21/fine-tuned-meditation-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Phoenix21/fine-tuned-meditation-model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Phoenix21/fine-tuned-meditation-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Phoenix21/fine-tuned-meditation-model with Docker Model Runner:
docker model run hf.co/Phoenix21/fine-tuned-meditation-model
Fine-Tuned Meditation Text Generation Model
This model is fine-tuned for generating text related to meditation and mindfulness topics. It is compatible with the Hugging Face Transformers library and is optimized for text generation tasks.
Intended Use
This model is designed to assist users by generating informative or calming text related to meditation, mindfulness, and relaxation practices. It can be used to create content for meditation guides, descriptions, or other wellness-oriented resources.
Example Usage with Hugging Face Transformers
To use this model for text generation, you can load it directly with the Hugging Face pipeline and generate responses based on prompts related to meditation and mindfulness.
Code Example
Install the required libraries if you haven’t already:
pip install transformers torch
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
# Load the model and tokenizer
model_name = "Phoenix21/fine-tuned-meditation-model" # Replace with your model path on Hugging Face
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Create a text generation pipeline
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
# Example prompt
prompt = "Meditation is a powerful tool for managing stress because"
output = generator(prompt, max_length=100, do_sample=True, temperature=0.7)
# Print generated text
print(output[0]["generated_text"])
- Downloads last month
- -