Run this model with HF Jobs
Run KoalaAI/Bamboo-Nano on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/KoalaAI/Bamboo-Nano. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/KoalaAI/Bamboo-Nano on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/KoalaAI/Bamboo-Nano. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/KoalaAI/Bamboo-Nano. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use KoalaAI/Bamboo-Nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KoalaAI/Bamboo-Nano with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KoalaAI/Bamboo-Nano")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KoalaAI/Bamboo-Nano") model = AutoModelForCausalLM.from_pretrained("KoalaAI/Bamboo-Nano", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KoalaAI/Bamboo-Nano with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KoalaAI/Bamboo-Nano" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KoalaAI/Bamboo-Nano", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KoalaAI/Bamboo-Nano
- SGLang
How to use KoalaAI/Bamboo-Nano 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 "KoalaAI/Bamboo-Nano" \ --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": "KoalaAI/Bamboo-Nano", "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 "KoalaAI/Bamboo-Nano" \ --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": "KoalaAI/Bamboo-Nano", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KoalaAI/Bamboo-Nano with Docker Model Runner:
docker model run hf.co/KoalaAI/Bamboo-Nano
Running in ollama
Hi, I'm trying to get this model to run in Ollama. It seems that it is the only model out there that is training on public domain code.
I try putting it in llama.cpp's convert_hf_to_gguf.py and I get "NotImplementedError: BPE pre-tokenizer was not recognized - update get_vocab_base_pre()". The BPE pre-tokenizer "48b3395982eda712c0f3aaa4056c791b9a2db4ee474467631e77bb46dab2b235" is also not recognized.
Would it be possible to ship the model in gguf format?
Hey there,
I have no idea how Ollama works (I assume it is just llama.cpp in a wrapper, since you talk about GGUF files), but in general this model is more of a "proof of concept", and as such is very limited as to what it can do, I have plans to make a proper, larger model also trained on CC0 data, but I have yet to get around to it.
I'll make sure to let you know when I do! :) (and to supply gguf files)