Instructions to use misterkilgore/opt-350m-psy-ita with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use misterkilgore/opt-350m-psy-ita with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="misterkilgore/opt-350m-psy-ita")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("misterkilgore/opt-350m-psy-ita") model = AutoModelForCausalLM.from_pretrained("misterkilgore/opt-350m-psy-ita", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use misterkilgore/opt-350m-psy-ita with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "misterkilgore/opt-350m-psy-ita" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "misterkilgore/opt-350m-psy-ita", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/misterkilgore/opt-350m-psy-ita
- SGLang
How to use misterkilgore/opt-350m-psy-ita 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 "misterkilgore/opt-350m-psy-ita" \ --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": "misterkilgore/opt-350m-psy-ita", "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 "misterkilgore/opt-350m-psy-ita" \ --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": "misterkilgore/opt-350m-psy-ita", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use misterkilgore/opt-350m-psy-ita with Docker Model Runner:
docker model run hf.co/misterkilgore/opt-350m-psy-ita
Italian Psychology opt-350m
This model is a fine-tuned version of the Meta OPT-350M language model, trained on a dataset of Italian psychology articles. It is capable of generating human-like text on topics related to psychology and mental health in Italian language.
Model details
The base model used for fine-tuning is the Meta OPT-350M, with a transformer architecture and 350M parameters. The fine-tuning dataset consists of approximately 10,000 Italian psychology articles.
Example usage
from transformers import pipeline
nlp = pipeline("text-generation", model="misterkilgore/opt-350m-psy-ita")
generated_text = nlp("Le cause del disturbo d'ansia nei bambini sono", max_length=100)
print(generated_text)
Limitations and bias
This model has been trained on a dataset of Italian psychology articles and may not perform well on other types of text or in other languages. Additionally, the dataset used to fine-tune the model may contain biases and limitations, which will be reflected in the generated text.
Dataset
The dataset used to fine-tune this model is composed of Italian psychology articles. It contains various topics on mental health and psychology, but some limitations and biases may be present. This model is meant to be used only for research and educational purposes.
Training data
The training data is composed of Italian psychology articles. Fine-tuning was performed on this dataset to adapt the base OPT-350m model to the specific topic of psychology and mental health in Italian language.
- Downloads last month
- 9