Instructions to use leivajandro/Baguettotron with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use leivajandro/Baguettotron with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("leivajandro/Baguettotron") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Transformers
How to use leivajandro/Baguettotron with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="leivajandro/Baguettotron")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("leivajandro/Baguettotron") model = AutoModelForCausalLM.from_pretrained("leivajandro/Baguettotron", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use leivajandro/Baguettotron with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leivajandro/Baguettotron" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leivajandro/Baguettotron", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/leivajandro/Baguettotron
- SGLang
How to use leivajandro/Baguettotron 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 "leivajandro/Baguettotron" \ --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": "leivajandro/Baguettotron", "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 "leivajandro/Baguettotron" \ --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": "leivajandro/Baguettotron", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - MLX LM
How to use leivajandro/Baguettotron with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "leivajandro/Baguettotron" --prompt "Once upon a time"
- Docker Model Runner
How to use leivajandro/Baguettotron with Docker Model Runner:
docker model run hf.co/leivajandro/Baguettotron
- Atomic Chat
Download tokenizer_config.json from leivajandro/Baguettotron: direct link, hf CLI and curl.
- Browser
- Download file 9.56 kB
-
https://huggingface.co/leivajandro/Baguettotron/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://leivajandro/Baguettotron/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/leivajandro/Baguettotron/resolve/main/tokenizer_config.json
9.56 kB
| { | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "[UNK]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<|begin_of_text|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "<|end_of_text|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "[PAD]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65491": { | |
| "content": "<|im_start|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65492": { | |
| "content": "<|im_end>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65493": { | |
| "content": "<think>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65494": { | |
| "content": "</think>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65495": { | |
| "content": "source_1", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65496": { | |
| "content": "source_2", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65497": { | |
| "content": "source_3", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65498": { | |
| "content": "source_4", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65499": { | |
| "content": "source_5", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65500": { | |
| "content": "source_6", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65501": { | |
| "content": "source_7", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65502": { | |
| "content": "source_8", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65503": { | |
| "content": "source_9", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65504": { | |
| "content": "source_10", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65505": { | |
| "content": "<ref", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65506": { | |
| "content": "</ref>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65507": { | |
| "content": "→", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65508": { | |
| "content": "↺", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65509": { | |
| "content": "※", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65510": { | |
| "content": "?maybe?", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65511": { | |
| "content": "●", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65512": { | |
| "content": "◐", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65513": { | |
| "content": "○", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65514": { | |
| "content": "⚠", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65515": { | |
| "content": "☐", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65516": { | |
| "content": "☑", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65517": { | |
| "content": "✓", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65518": { | |
| "content": "⟨H≈0.1⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65519": { | |
| "content": "⟨H≈0.2⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65520": { | |
| "content": "⟨H≈0.3⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65521": { | |
| "content": "⟨H≈0.4⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65522": { | |
| "content": "⟨H≈0.5⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65523": { | |
| "content": "⟨H≈0.6⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65524": { | |
| "content": "⟨H≈0.7⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65525": { | |
| "content": "⟨H≈0.8⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65526": { | |
| "content": "⟨H≈0.9⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65527": { | |
| "content": "⟨H≈1.0⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65528": { | |
| "content": "⟨H≈1.1⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65529": { | |
| "content": "⟨H≈1.2⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65530": { | |
| "content": "⟨H≈1.3⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65531": { | |
| "content": "⟨H≈1.4⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65532": { | |
| "content": "⟨H≈1.5⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65533": { | |
| "content": "⟨H≈1.6⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65534": { | |
| "content": "⟨H≈1.7⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "65535": { | |
| "content": "⟨H≈1.8⟩", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "additional_special_tokens": [ | |
| "<|im_start|>", | |
| "<|im_end>", | |
| "<think>", | |
| "</think>", | |
| "source_1", | |
| "source_2", | |
| "source_3", | |
| "source_4", | |
| "source_5", | |
| "source_6", | |
| "source_7", | |
| "source_8", | |
| "source_9", | |
| "source_10", | |
| "<ref", | |
| "</ref>", | |
| "→", | |
| "↺", | |
| "※", | |
| "?maybe?", | |
| "●", | |
| "◐", | |
| "○", | |
| "⚠", | |
| "☐", | |
| "☑", | |
| "✓", | |
| "⟨H≈0.1⟩", | |
| "⟨H≈0.2⟩", | |
| "⟨H≈0.3⟩", | |
| "⟨H≈0.4⟩", | |
| "⟨H≈0.5⟩", | |
| "⟨H≈0.6⟩", | |
| "⟨H≈0.7⟩", | |
| "⟨H≈0.8⟩", | |
| "⟨H≈0.9⟩", | |
| "⟨H≈1.0⟩", | |
| "⟨H≈1.1⟩", | |
| "⟨H≈1.2⟩", | |
| "⟨H≈1.3⟩", | |
| "⟨H≈1.4⟩", | |
| "⟨H≈1.5⟩", | |
| "⟨H≈1.6⟩", | |
| "⟨H≈1.7⟩", | |
| "⟨H≈1.8⟩" | |
| ], | |
| "clean_up_tokenization_spaces": true, | |
| "extra_special_tokens": {}, | |
| "model_max_length": 1000000000000000019884624838656, | |
| "tokenizer_class": "PreTrainedTokenizerFast" | |
| } | |