Instructions to use bart1259/MiniCOTMath with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bart1259/MiniCOTMath with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bart1259/MiniCOTMath")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bart1259/MiniCOTMath") model = AutoModelForCausalLM.from_pretrained("bart1259/MiniCOTMath", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bart1259/MiniCOTMath with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bart1259/MiniCOTMath" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bart1259/MiniCOTMath", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bart1259/MiniCOTMath
- SGLang
How to use bart1259/MiniCOTMath 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 "bart1259/MiniCOTMath" \ --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": "bart1259/MiniCOTMath", "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 "bart1259/MiniCOTMath" \ --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": "bart1259/MiniCOTMath", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bart1259/MiniCOTMath with Docker Model Runner:
docker model run hf.co/bart1259/MiniCOTMath
Download tokenizer.json from bart1259/MiniCOTMath: direct link, hf CLI and curl.
- Browser
- Download file 2.16 kB
-
https://huggingface.co/bart1259/MiniCOTMath/resolve/cc65cad52aefa4e38b229f84e25cd80efcae56a3/tokenizer.json
- Command line
-
hf download hf://bart1259/MiniCOTMath@cc65cad52aefa4e38b229f84e25cd80efcae56a3/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/bart1259/MiniCOTMath/resolve/cc65cad52aefa4e38b229f84e25cd80efcae56a3/tokenizer.json
2.16 kB
| { | |
| "version": "1.0", | |
| "truncation": null, | |
| "padding": null, | |
| "added_tokens": [ | |
| { | |
| "id": 0, | |
| "content": "[UNK]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 1, | |
| "content": "[CLS]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 2, | |
| "content": "[SEP]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 3, | |
| "content": "[PAD]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 4, | |
| "content": "[MASK]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| } | |
| ], | |
| "normalizer": null, | |
| "pre_tokenizer": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": false, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "post_processor": null, | |
| "decoder": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": true, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "model": { | |
| "type": "BPE", | |
| "dropout": null, | |
| "unk_token": "[UNK]", | |
| "continuing_subword_prefix": null, | |
| "end_of_word_suffix": null, | |
| "fuse_unk": false, | |
| "byte_fallback": false, | |
| "ignore_merges": false, | |
| "vocab": { | |
| "[UNK]": 0, | |
| "[CLS]": 1, | |
| "[SEP]": 2, | |
| "[PAD]": 3, | |
| "[MASK]": 4, | |
| "(": 5, | |
| ")": 6, | |
| "*": 7, | |
| "+": 8, | |
| "-": 9, | |
| "0": 10, | |
| "1": 11, | |
| "2": 12, | |
| "3": 13, | |
| "4": 14, | |
| "5": 15, | |
| "6": 16, | |
| "7": 17, | |
| "8": 18, | |
| "9": 19, | |
| ":": 20, | |
| "<": 21, | |
| "=": 22, | |
| ">": 23, | |
| "F": 24, | |
| "I": 25, | |
| "R": 26, | |
| "S": 27, | |
| "a": 28, | |
| "d": 29, | |
| "e": 30, | |
| "i": 31, | |
| "l": 32, | |
| "n": 33, | |
| "p": 34, | |
| "s": 35, | |
| "t": 36, | |
| "u": 37, | |
| "Ċ": 38, | |
| "Ġ": 39 | |
| }, | |
| "merges": [] | |
| } | |
| } |