Instructions to use Alelcv27/Llama3.2-3B-Base-Code-Math with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alelcv27/Llama3.2-3B-Base-Code-Math with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Alelcv27/Llama3.2-3B-Base-Code-Math")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Alelcv27/Llama3.2-3B-Base-Code-Math") model = AutoModelForCausalLM.from_pretrained("Alelcv27/Llama3.2-3B-Base-Code-Math", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Alelcv27/Llama3.2-3B-Base-Code-Math with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Alelcv27/Llama3.2-3B-Base-Code-Math" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alelcv27/Llama3.2-3B-Base-Code-Math", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Alelcv27/Llama3.2-3B-Base-Code-Math
- SGLang
How to use Alelcv27/Llama3.2-3B-Base-Code-Math 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 "Alelcv27/Llama3.2-3B-Base-Code-Math" \ --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": "Alelcv27/Llama3.2-3B-Base-Code-Math", "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 "Alelcv27/Llama3.2-3B-Base-Code-Math" \ --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": "Alelcv27/Llama3.2-3B-Base-Code-Math", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use Alelcv27/Llama3.2-3B-Base-Code-Math with Docker Model Runner:
docker model run hf.co/Alelcv27/Llama3.2-3B-Base-Code-Math
Download tokenizer_config.json from Alelcv27/Llama3.2-3B-Base-Code-Math: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/Alelcv27/Llama3.2-3B-Base-Code-Math/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://Alelcv27/Llama3.2-3B-Base-Code-Math/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/Alelcv27/Llama3.2-3B-Base-Code-Math/resolve/main/tokenizer_config.json
540 Bytes
| { | |
| "backend": "tokenizers", | |
| "bos_token": "<|begin_of_text|>", | |
| "clean_up_tokenization_spaces": true, | |
| "eos_token": "<|end_of_text|>", | |
| "from_slow": true, | |
| "is_local": false, | |
| "legacy": false, | |
| "max_length": 2048, | |
| "model_input_names": [ | |
| "input_ids", | |
| "attention_mask" | |
| ], | |
| "model_max_length": 131072, | |
| "pad_token": "<|finetune_right_pad_id|>", | |
| "padding_side": "left", | |
| "stride": 0, | |
| "tokenizer_class": "TokenizersBackend", | |
| "truncation_side": "right", | |
| "truncation_strategy": "longest_first", | |
| "unk_token": null | |
| } |