Text Generation
Transformers
Safetensors
English
tiny
tiny-model
slm
small-language-model
from-scratch
conversation
Instructions to use Compactbot/discussion-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Compactbot/discussion-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Compactbot/discussion-model")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Compactbot/discussion-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Compactbot/discussion-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Compactbot/discussion-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Compactbot/discussion-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Compactbot/discussion-model
- SGLang
How to use Compactbot/discussion-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 "Compactbot/discussion-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": "Compactbot/discussion-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 "Compactbot/discussion-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": "Compactbot/discussion-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Compactbot/discussion-model with Docker Model Runner:
docker model run hf.co/Compactbot/discussion-model
| [ | |
| { | |
| "context": "kinda_alone: Youre a keeper then; he better merry you\nLampmonster1: You'd better merry Christmas.\nkinda_alone: Haha whoops by no means did I mean marry. I want him to make sure she is very joyful, ie. merry.\n[deleted]: that sentence makes no sense if you say merry rather than marry... well its really not the best word choice.", | |
| "generated": "prompter: What is a lengram, and the of the the, and the the . d, and the .prompter: Can you have a .pter: What is ales of the the the the (res: How can be the the (2. ()." | |
| }, | |
| { | |
| "context": "Matt872000: I'm curious as to why they didn't turn the water off to do this...\nfuriouspanda1: Toilet flushes from the tank, which would already be filled before the water is turned off, hence is still flushable. Did this to my dad once - he was not pleased.\nwheresmyhouse: So, if you close the inlet valves and then flush the toilet before starting work, wouldn't that make it unflushable?\nfuriouspa", | |
| "generated": " the (2. ().promprompter:2.pter: I amer.prompter: What is the the data, and the the the (2.prompter: How can be that can be a (22.res, and the (2" | |
| }, | |
| { | |
| "context": "bnm3424: IFUO; A necklace leads to what was probably a minor concussion.\nWhile getting ready for my first date I was putting on a necklace. At the time I had really long hair and so, I flipped my head over to do the clasp, at which point I knocked my head off of the bed post.\n\nI landed in my desk chair, not on purpose, and was very confused about how I had gotten there... Got up, flipped my head a", | |
| "generated": " different, the (d, and the (s, and the (P) is the Pical and the, and, and the (cial, and the ().prompter: (, and (), the ().prompter: Can you are the (2." | |
| } | |
| ] |