uv tool run opik harbor trials start -p ./examples/tasks/k8s-hello-world/ \
--agent "terminus-2" \
--agent-kwarg "api_base=$OPENAI_API_BASE" \
--model "hosted_vllm/$MODEL" \
--environment-type "docker"
OPIK: Opik tracking enabled for Harbor
Starting trial: k8s-hello-world__wv9bPao
Task: k8s-hello-world
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # # Serverless OpenThinker Agent v1 with vLLM and Modal | |
| # This example shows how to serve Hugging Face's | |
| # [open-thoughts/OpenThinker-Agent-v1](https://huggingface.co/open-thoughts/OpenThinker-Agent-v1) | |
| # with vLLM on Modal. | |
| # OpenThinker-Agent-v1 is an agentic model post-trained from Qwen/Qwen3-8B via supervised fine-tuning and reinforcement learning, | |
| # and it excels on agent benchmarks such as Terminal-Bench 2.0 and SWE-Bench. | |
| # We include the same Modal best practices as our other inference demos: | |
| # - GPU snapshots for faster cold starts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check if the argument is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <path_storage>" | |
| exit 1 | |
| fi | |
| PATH_STORAGE=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml" lang xml:lang> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="generator" content="nbh" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> | |
| <title>Notebook HTML Renderer</title> | |
| <!-- KaTeX --> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.js" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # install node | |
| # Download and install nvm: | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash | |
| # in lieu of restarting the shell | |
| \. "$HOME/.nvm/nvm.sh" | |
| # Download and install Node.js: | |
| nvm install 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| def compute_cost(num_nodes, gpus_per_node, cost_per_gpu_hour, days): | |
| """ | |
| Computes the cost of running a certain setup (num_nodes, gpus_per_node) | |
| for a specified number of days at a particular cost_per_gpu_hour. | |
| :param num_nodes: Number of nodes | |
| :param gpus_per_node: Number of GPUs in each node | |
| :param cost_per_gpu_hour: Cost per GPU-hour in USD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from tqdm.auto import tqdm | |
| import asyncio | |
| import aiohttp | |
| import json | |
| import time | |
| import os | |
| import textwrap | |
| TOGETHER_API_TOKEN = os.environ['TOGETHER_API_TOKEN'] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example usage: | |
| # python merge_peft.py --base_model=meta-llama/Llama-2-7b-hf --peft_model=./qlora-out --hub_id=alpaca-qlora | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| from peft import PeftModel | |
| import torch | |
| import argparse | |
| def get_args(): |
NewerOlder