Instructions to use underwater45/Oracle-Prototype with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use underwater45/Oracle-Prototype with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="underwater45/Oracle-Prototype")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("underwater45/Oracle-Prototype", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use underwater45/Oracle-Prototype with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "underwater45/Oracle-Prototype" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "underwater45/Oracle-Prototype", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/underwater45/Oracle-Prototype
- SGLang
How to use underwater45/Oracle-Prototype 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 "underwater45/Oracle-Prototype" \ --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": "underwater45/Oracle-Prototype", "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 "underwater45/Oracle-Prototype" \ --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": "underwater45/Oracle-Prototype", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use underwater45/Oracle-Prototype with Docker Model Runner:
docker model run hf.co/underwater45/Oracle-Prototype
| license: apache-2.0 | |
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| # Oracle Language Model | |
| ## Model Description | |
| Oracle is a combined language model that leverages the strengths of multiple pre-trained models to create a more powerful and versatile model. It combines BERT, RoBERTa, and DistilBERT into a single model, allowing it to benefit from the unique characteristics of each. | |
| ## Intended Uses & Limitations | |
| The Oracle model is designed for a wide range of natural language processing tasks, including but not limited to: | |
| - Text Classification | |
| - Named Entity Recognition | |
| - Question Answering | |
| - Sentiment Analysis | |
| As this is a combined model, it may have a larger computational footprint than individual models. Users should consider the trade-off between performance and computational resources. | |
| ## Training and Evaluation Data | |
| The Oracle model combines the following pre-trained models: | |
| - BERT (bert-base-uncased) | |
| - RoBERTa (roberta-base) | |
| - DistilBERT (distilbert-base-uncased) | |
| Each of these models was trained on its respective datasets. The Oracle model itself does not undergo additional pre-training but rather combines the outputs of these pre-trained models. | |
| ## Training Procedure | |
| The Oracle model is created by: | |
| 1. Loading the pre-trained BERT, RoBERTa, and DistilBERT models. | |
| 2. Passing input through each model separately. | |
| 3. Concatenating the outputs of all models. | |
| 4. Passing the concatenated output through a linear layer to produce the final output. | |
| ## Ethical Considerations | |
| As the Oracle model combines multiple pre-trained models, it may amplify biases present in any of the individual models. Users should be aware of potential biases and evaluate the model's output carefully, especially for sensitive applications. | |
| ## Citation | |
| If you use this model in your research, please cite: | |
| ``` | |
| @misc{oracle-language-model, | |
| author = {Your Name}, | |
| title = {Oracle: A Combined Language Model}, | |
| year = {2024}, | |
| publisher = {HuggingFace}, | |
| journal = {HuggingFace Model Hub}, | |
| howpublished = {\url{https://huggingface.co/your-username/oracle-model}} | |
| } | |
| ``` | |
| ## Usage | |
| Here's a simple example of how to use the Oracle model: | |
| ```python | |
| from transformers import AutoTokenizer, AutoModel | |
| # Load model and tokenizer | |
| model = AutoModel.from_pretrained("your-username/oracle-model") | |
| tokenizer = AutoTokenizer.from_pretrained("your-username/oracle-model") | |
| # Prepare input | |
| text = "Hello, I am Oracle!" | |
| inputs = tokenizer(text, return_tensors="pt") | |
| # Forward pass | |
| outputs = model(**inputs) | |
| # Process outputs | |
| embeddings = outputs.last_hidden_state | |
| ``` | |
| For more detailed usage instructions and examples, please refer to the model card on the Hugging Face Model Hub. |