Instructions to use pgfeldman/model_explorer_hello_world with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pgfeldman/model_explorer_hello_world with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pgfeldman/model_explorer_hello_world")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pgfeldman/model_explorer_hello_world") model = AutoModelForCausalLM.from_pretrained("pgfeldman/model_explorer_hello_world", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pgfeldman/model_explorer_hello_world with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pgfeldman/model_explorer_hello_world" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pgfeldman/model_explorer_hello_world", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pgfeldman/model_explorer_hello_world
- SGLang
How to use pgfeldman/model_explorer_hello_world 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 "pgfeldman/model_explorer_hello_world" \ --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": "pgfeldman/model_explorer_hello_world", "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 "pgfeldman/model_explorer_hello_world" \ --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": "pgfeldman/model_explorer_hello_world", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use pgfeldman/model_explorer_hello_world with Docker Model Runner:
docker model run hf.co/pgfeldman/model_explorer_hello_world
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
---
|
| 4 |
+
|
| 5 |
+
This model is a finetuned GPT-2 model on a small corpora of tweets about Paxlovid and Ivermectin. It is designed to be a "hello world" model to be used in conjunction with the "ModelExplorer" App that is part of the GitHub [KeywordExplorer](https://github.com/pgfeldman/KeywordExplorer) repository.
|
| 6 |
+
|
| 7 |
+
The key feature of this model is that it has been trained to use "Meta Wrapping", which adds additional information to a corpora that the model is then trained on. An example is shown below:
|
| 8 |
+
|
| 9 |
+
[[text: RT @Andygetout: Sehr geehrter @Karl_Lauterbach,gestern und heute musste ich mit Schrecken feststellen, wie und warum Paxlovid NICHT bei d… || created: 2022-09-04 07:10:25 || location: Kaiserslautern, Germany || probability: twenty]]
|
| 10 |
+
[[text: RT @axios: There's growing concern about the link between Pfizer's antiviral pill and COVID rebound, in which patients test positive or hav… || created: 2022-09-03 02:40:34 || location: Bendigo, Victoria. Australia || probability: thirty]]
|
| 11 |
+
|
| 12 |
+
|