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")# 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") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
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 repository.
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:
[[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]]
[[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]]
In this case a tweet (everything after "text:"" and before "||") has been embedded in MetaWrapping, which adds information like date, location, and an arbitrary "probability" tag that will be "ten", "twenty", "thirty", or "forty". When generating text, these tags will reflect the meta information as well as the text. For example, a well-trained model will have "probability: ten" close to 10% of the time
- Downloads last month
- 5