Run this model with HF Jobs
Run nvidia/OpenMath-CodeLlama-34b-Python-hf 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/nvidia/OpenMath-CodeLlama-34b-Python-hf. 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/nvidia/OpenMath-CodeLlama-34b-Python-hf 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/nvidia/OpenMath-CodeLlama-34b-Python-hf. 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/nvidia/OpenMath-CodeLlama-34b-Python-hf. 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 nvidia/OpenMath-CodeLlama-34b-Python-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/OpenMath-CodeLlama-34b-Python-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/OpenMath-CodeLlama-34b-Python-hf")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nvidia/OpenMath-CodeLlama-34b-Python-hf") model = AutoModelForCausalLM.from_pretrained("nvidia/OpenMath-CodeLlama-34b-Python-hf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/OpenMath-CodeLlama-34b-Python-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/OpenMath-CodeLlama-34b-Python-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nvidia/OpenMath-CodeLlama-34b-Python-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nvidia/OpenMath-CodeLlama-34b-Python-hf
- SGLang
How to use nvidia/OpenMath-CodeLlama-34b-Python-hf 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 "nvidia/OpenMath-CodeLlama-34b-Python-hf" \ --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": "nvidia/OpenMath-CodeLlama-34b-Python-hf", "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 "nvidia/OpenMath-CodeLlama-34b-Python-hf" \ --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": "nvidia/OpenMath-CodeLlama-34b-Python-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nvidia/OpenMath-CodeLlama-34b-Python-hf with Docker Model Runner:
docker model run hf.co/nvidia/OpenMath-CodeLlama-34b-Python-hf
Update README.md
Browse files82 unmodified lines83848586878820 unmodified lines10911011111211311411582 unmodified lines- [Models](https://huggingface.co/collections/nvidia/openmath-65c5619de2ba059be0775014)- [Dataset](https://huggingface.co/datasets/nvidia/OpenMathInstruct-1)# How to use the models?Try to [run inference with our models](https://github.com/Kipok/NeMo-Skills/blob/main/docs/inference.md) with just a few commands!20 unmodified linesIf you find our work useful, please consider citing us!TODO# License82 unmodified lines838485868788899020 unmodified lines11111211311411511611711811912012112212312482 unmodified lines- [Models](https://huggingface.co/collections/nvidia/openmath-65c5619de2ba059be0775014)- [Dataset](https://huggingface.co/datasets/nvidia/OpenMathInstruct-1)See our [paper](https://arxiv.org/abs/2402.10176) for more details!# How to use the models?Try to [run inference with our models](https://github.com/Kipok/NeMo-Skills/blob/main/docs/inference.md) with just a few commands!20 unmodified linesIf you find our work useful, please consider citing us!```bibtex@article{toshnival2024openmath,title = {OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Dataset},author = {Shubham Toshniwal and Ivan Moshkov and Sean Narenthiran and Daria Gitman and Fei Jia and Igor Gitman},year = {2024},journal = {arXiv preprint arXiv: Arxiv-2402.10176}}```# License
README.md+10-1