Instructions to use CCBD-Interns/multiligual-arithmetic-sample2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CCBD-Interns/multiligual-arithmetic-sample2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CCBD-Interns/multiligual-arithmetic-sample2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CCBD-Interns/multiligual-arithmetic-sample2") model = AutoModelForCausalLM.from_pretrained("CCBD-Interns/multiligual-arithmetic-sample2") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CCBD-Interns/multiligual-arithmetic-sample2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CCBD-Interns/multiligual-arithmetic-sample2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CCBD-Interns/multiligual-arithmetic-sample2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CCBD-Interns/multiligual-arithmetic-sample2
- SGLang
How to use CCBD-Interns/multiligual-arithmetic-sample2 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 "CCBD-Interns/multiligual-arithmetic-sample2" \ --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": "CCBD-Interns/multiligual-arithmetic-sample2", "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 "CCBD-Interns/multiligual-arithmetic-sample2" \ --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": "CCBD-Interns/multiligual-arithmetic-sample2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CCBD-Interns/multiligual-arithmetic-sample2 with Docker Model Runner:
docker model run hf.co/CCBD-Interns/multiligual-arithmetic-sample2
| { | |
| "version": "1.0", | |
| "truncation": null, | |
| "padding": { | |
| "strategy": "BatchLongest", | |
| "direction": "Left", | |
| "pad_to_multiple_of": null, | |
| "pad_id": 0, | |
| "pad_type_id": 0, | |
| "pad_token": "<pad>" | |
| }, | |
| "added_tokens": [ | |
| { | |
| "id": 0, | |
| "content": "<pad>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 1, | |
| "content": "<bos>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 2, | |
| "content": "<eos>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 3, | |
| "content": "<unk>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| } | |
| ], | |
| "normalizer": null, | |
| "pre_tokenizer": { | |
| "type": "Split", | |
| "pattern": { | |
| "Regex": "[\\s\\S]" | |
| }, | |
| "behavior": "Isolated", | |
| "invert": false | |
| }, | |
| "post_processor": { | |
| "type": "TemplateProcessing", | |
| "single": [ | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| } | |
| ], | |
| "pair": [ | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "Sequence": { | |
| "id": "B", | |
| "type_id": 1 | |
| } | |
| } | |
| ], | |
| "special_tokens": {} | |
| }, | |
| "decoder": { | |
| "type": "Fuse" | |
| }, | |
| "model": { | |
| "type": "WordLevel", | |
| "vocab": { | |
| "<pad>": 0, | |
| "<bos>": 1, | |
| "<eos>": 2, | |
| "<unk>": 3, | |
| "\n": 4, | |
| "+": 5, | |
| "0": 6, | |
| "1": 7, | |
| "2": 8, | |
| "3": 9, | |
| "4": 10, | |
| "5": 11, | |
| "6": 12, | |
| "7": 13, | |
| "8": 14, | |
| "9": 15, | |
| "=": 16, | |
| "०": 17, | |
| "१": 18, | |
| "२": 19, | |
| "३": 20, | |
| "४": 21, | |
| "५": 22, | |
| "६": 23, | |
| "७": 24, | |
| "८": 25, | |
| "९": 26, | |
| "一": 27, | |
| "七": 28, | |
| "三": 29, | |
| "九": 30, | |
| "二": 31, | |
| "五": 32, | |
| "八": 33, | |
| "六": 34, | |
| "十": 35, | |
| "千": 36, | |
| "四": 37, | |
| "百": 38, | |
| "零": 39 | |
| }, | |
| "unk_token": "<unk>" | |
| } | |
| } |