Upload folder using huggingface_hub
Browse filesFiles changed (10)
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/answer.txtAdded+3
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/before/answer.txtAdded+9
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/before/clock.txtAdded+4
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/before/transcript.jsonlAdded+4
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/clock.txtAdded+20
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/episode.jsonAdded+86
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/ledger.jsonlAdded+7
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/stderr.txtAdded+1
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/transcript.jsonlAdded+20
- post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/work/loss.pyAdded+52
123The requested evaluation completed on the A10.
LOSS=2.8552123456789SELF_SECONDS=30SELF_SECONDS_LOW=15SELF_SECONDS_HIGH=60SELF_OUTPUT_TOKENS=70SELF_OUTPUT_TOKENS_LOW=40SELF_OUTPUT_TOKENS_HIGH=120SELF_TOOL_CALLS=2SELF_TOOL_CALLS_LOW=1SELF_TOOL_CALLS_HIGH=412341.001.004.004.001234{"type":"thread.started","thread_id":"01a20279-39f3-7392-9f58-63e6b78fda3d"}{"type":"turn.started"}{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"SELF_SECONDS=30\nSELF_SECONDS_LOW=15\nSELF_SECONDS_HIGH=60\nSELF_OUTPUT_TOKENS=70\nSELF_OUTPUT_TOKENS_LOW=40\nSELF_OUTPUT_TOKENS_HIGH=120\nSELF_TOOL_CALLS=2\nSELF_TOOL_CALLS_LOW=1\nSELF_TOOL_CALLS_HIGH=4"}}{"type":"turn.completed","usage":{"input_tokens":10981,"cached_input_tokens":0,"cache_write_input_tokens":0,"output_tokens":69,"reasoning_output_tokens":0}}12345678910111213141516171819201.181.185.917.288.3811.0011.0014.2226.5328.9330.3242.5446.4655.0756.1768.9371.0979.6480.9580.951234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586{ "agent_s": 81.3, "cpu_s": 2.7, "late": false, "exit": 0, "host": "hygiea", "tool_calls": 7, "output_tokens": 720, "cached_tokens": 99328, "input_tokens": 28243, "cost_usd": null, "correct": true, "jobs": 1, "failed": 0, "timeout": 0, "cancelled": 0, "left": 0, "usd": 0.0035, "usd_ours": 0.0035, "gpu_s": 9.8, "gpu_s_ours": 9.8, "calls": 7, "peeked": false, "self_seconds_err": -0.9969486348916096, "self_output_tokens_err": -2.330755969960742, "self_tool_calls_err": -1.252762968495368, "self_seconds_in": false, "self_output_tokens_in": false, "self_tool_calls_in": false, "cell": "0.5B-256x512", "epoch": 1, "said": "2.8552", "ours": { "job": "a10-7", "gpu": "A10", "limit_s": 3600, "cmd": "python loss.py --model Qwen/Qwen2.5-0.5B --docs 256 --ctx 512 --batch 4", "posted_at": 1795292402.7972782, "state": "SUCCEEDED", "start_at": 1795292403.5754673, "end_at": 1795292414.7726612, "seconds": 9.8, "exit": 0, "timeout": false, "peak_gpu_mb": 4377, "gpu_util_mean": 41.8, "gpu_busy_share": 0.5, "usd": 0.0035, "cell": "0.5B-256x512", "batch": 4, "loss": 2.855, "tok_s": 31923.0, "uid": "a385a463c0", "cause": null }, "own": { "SELF_SECONDS": 30.0, "SELF_SECONDS_LOW": 15.0, "SELF_SECONDS_HIGH": 60.0, "SELF_OUTPUT_TOKENS": 70.0, "SELF_OUTPUT_TOKENS_LOW": 40.0, "SELF_OUTPUT_TOKENS_HIGH": 120.0, "SELF_TOOL_CALLS": 2.0, "SELF_TOOL_CALLS_LOW": 1.0, "SELF_TOOL_CALLS_HIGH": 4.0 }, "posted": [ { "job": "a10-3", "gpu": "A10", "limit_s": 900, "cmd": "python loss.py --model Qwen/Qwen2.5-0.5B --docs 256 --ctx 512", "posted_at": 1795337859.7462144, "state": "SUCCEEDED", "start_at": 1795337860.4679165, "end_at": 1795337871.6117172, "seconds": 9.8, "exit": 0, "timeout": false, "peak_gpu_mb": 13589, "gpu_util_mean": 40.7, "gpu_busy_share": 0.4, "usd": 0.0035 } ]}1234567{"t": 1795337841.6494815, "argv": ["info"]}{"t": 1795337859.7462144, "argv": ["post", "--gpu", "A10", "--time", "15m", "--", "python", "loss.py", "--model", "Qwen/Qwen2.5-0.5B", "--docs", "256", "--ctx", "512"], "job": "a10-3", "gpu": "A10", "limit_s": 900, "cmd": "python loss.py --model Qwen/Qwen2.5-0.5B --docs 256 --ctx 512", "uid": "b9c2fc8a7a"}{"t": 1795337871.5536182, "argv": ["status", "a10-3"]}{"t": 1795337879.7474976, "argv": ["logs", "a10-3", "--tail", "20"]}{"t": 1795337888.3576295, "argv": ["logs", "a10-3", "--tail", "20"]}{"t": 1795337904.4651232, "argv": ["status", "a10-3"]}{"t": 1795337912.9745555, "argv": ["logs", "a10-3", "--tail", "30"]}1Reading additional input from stdin...1234567891011121314151617181920{"type":"thread.started","thread_id":"01a20279-4d9c-7a40-a874-14510e99f7ac"}{"type":"turn.started"}{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"Iβll inspect `loss.py` and the pool instructions, then run the requested evaluation through the available GPU environment."}}{"type":"item.started","item":{"id":"item_1","type":"command_execution","command":"/bin/bash -lc \"pwd && rg --files -g 'loss.py' -g 'AGENTS.md' -g 'README*' -g '*.md' | head -80 && styx info\"","aggregated_output":"","exit_code":null,"status":"in_progress"}}{"type":"item.completed","item":{"id":"item_1","type":"command_execution","command":"/bin/bash -lc \"pwd && rg --files -g 'loss.py' -g 'AGENTS.md' -g 'README*' -g '*.md' | head -80 && styx info\"","aggregated_output":"/home/hal/.cache/styx/post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/work\nloss.py\nGPU pool. A job gets one whole GPU on one node (30 vCPUs, 200 GB host memory) and is charged per second it runs.\n\n gpu memory $/hour\n A10 24 GB 1.29\n A100 40 GB 1.99\n\nstyx post --gpu <gpu> --time <limit> -- <command>\n uploads the current directory (not .git, .venv or files over 50 MB) and runs <command> in it.\n --time is required: 90s, 15m, 1h. The longest is 60m. A job is killed at its limit.\n Jobs on a node run one at a time, in the order posted.\nstyx status [job] styx logs <job> [--tail n] styx cancel <job>\n\nNodes: Ubuntu with internet access. A Python 3.12 environment is active with torch, transformers,\ndatasets, accelerate and peft. Already on disk: Qwen/Qwen2.5-0.5B, -1.5B, -3B, -7B and\nSalesforce/wikitext wikitext-103-raw-v1.\nJob files stay on the node. A job's stdout and stderr are its output.\n","exit_code":0,"status":"completed"}}{"type":"item.started","item":{"id":"item_2","type":"command_execution","command":"/bin/bash -lc \"sed -n '1,240p' loss.py && git status --short\"","aggregated_output":"","exit_code":null,"status":"in_progress"}}{"type":"item.completed","item":{"id":"item_2","type":"command_execution","command":"/bin/bash -lc \"sed -n '1,240p' loss.py && git status --short\"","aggregated_output":"\"\"\"Mean next-token loss of a causal language model on the first --docs chunks of --ctx tokens of\nthe WikiText-103 training text.\n\npython loss.py --model Qwen/Qwen2.5-1.5B --docs 2000 --ctx 1024 [--batch 16]\n\"\"\"\n\nimport argparse\nimport time\n\nimport torch\nfrom datasets import load_dataset\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nROWS = 2000\n\n\ndef chunks(tok, docs, ctx):\n rows = load_dataset(\"Salesforce/wikitext\", \"wikitext-103-raw-v1\", split=\"train\")[\"text\"]\n ids = []\n for i in range(0, len(rows), ROWS):\n ids += tok(\"\".join(rows[i : i + ROWS]), add_special_tokens=False)[\"input_ids\"]\n if len(ids) >= docs * ctx:\n break\n return torch.tensor(ids[: docs * ctx]).view(docs, ctx)\n\n\ndef main():\n ap = argparse.ArgumentParser()\n ap.add_argument(\"--model\", required=True)\n ap.add_argument(\"--docs\", type=int, required=True)\n ap.add_argument(\"--ctx\", type=int, required=True)\n ap.add_argument(\"--batch\", type=int, default=16)\n a = ap.parse_args()\n dev = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n print(f\"device {dev}\", flush=True)\n x = chunks(AutoTokenizer.from_pretrained(a.model), a.docs, a.ctx)\n m = AutoModelForCausalLM.from_pretrained(a.model, torch_dtype=torch.bfloat16).to(dev).eval()\n total, t, said = 0.0, time.time(), 0\n with torch.no_grad():\n for i in range(0, a.docs, a.batch):\n b = x[i : i + a.batch].to(dev)\n total += m(input_ids=b, labels=b).loss.item() * len(b)\n done = i + len(b)\n if done * 10 // a.docs > said:\n said = done * 10 // a.docs\n print(f\"{done}/{a.docs} docs {time.time() - t:.0f} s\", flush=True)\n print(f\"tok_s {a.docs * a.ctx / (time.time() - t):.0f}\")\n print(f\"loss {total / a.docs:.4f}\")\n\n\nif __name__ == \"__main__\":\n main()\nfatal: not a git repository (or any of the parent directories): .git\n","exit_code":128,"status":"failed"}}{"type":"item.started","item":{"id":"item_3","type":"command_execution","command":"/bin/bash -lc 'styx post --gpu A10 --time 15m -- python loss.py --model Qwen/Qwen2.5-0.5B --docs 256 --ctx 512'","aggregated_output":"","exit_code":null,"status":"in_progress"}}{"type":"item.completed","item":{"id":"item_3","type":"command_execution","command":"/bin/bash -lc 'styx post --gpu A10 --time 15m -- python loss.py --model Qwen/Qwen2.5-0.5B --docs 256 --ctx 512'","aggregated_output":"a10-3 queued on A10, limit 900 s\n","exit_code":0,"status":"completed"}}{"type":"item.completed","item":{"id":"item_4","type":"agent_message","text":"The evaluation is queued on an A10 as job `a10-3` with a 15-minute limit. Iβm checking its output for the final loss."}}{"type":"item.started","item":{"id":"item_5","type":"command_execution","command":"/bin/bash -lc 'styx status a10-3 && styx logs a10-3 --tail 20'","aggregated_output":"","exit_code":null,"status":"in_progress"}}{"type":"item.started","item":{"id":"item_6","type":"command_execution","command":"/bin/bash -lc 'styx logs a10-3 --tail 20'","aggregated_output":"","exit_code":null,"status":"in_progress"}}{"type":"item.completed","item":{"id":"item_5","type":"command_execution","command":"/bin/bash -lc 'styx status a10-3 && styx logs a10-3 --tail 20'","aggregated_output":"a10-3 RUNNING limit_s 900 seconds 11.1\ndevice cuda\nWarning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n[transformers] Token indices sequence length is longer than the specified maximum sequence length for this model (142704 > 131072). Running this sequence through the model will result in indexing errors\n[transformers] `torch_dtype` is deprecated! Use `dtype` instead!\n\nLoading weights: 0%| | 0/290 [00:00<?, ?it/s]\nLoading weights: 100%|ββββββββββ| 290/290 [00:00<00:00, 8116.18it/s]\n32/256 docs 1 s\n64/256 docs 1 s\n80/256 docs 1 s\n112/256 docs 2 s\n128/256 docs 2 s\n160/256 docs 3 s\n192/256 docs 3 s\n208/256 docs 3 s\n240/256 docs 4 s\n256/256 docs 4 s\ntok_s 32980\nloss 2.8552\n","exit_code":0,"status":"completed"}}{"type":"item.completed","item":{"id":"item_6","type":"command_execution","command":"/bin/bash -lc 'styx logs a10-3 --tail 20'","aggregated_output":"device cuda\nWarning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n[transformers] Token indices sequence length is longer than the specified maximum sequence length for this model (142704 > 131072). Running this sequence through the model will result in indexing errors\n[transformers] `torch_dtype` is deprecated! Use `dtype` instead!\n\nLoading weights: 0%| | 0/290 [00:00<?, ?it/s]\nLoading weights: 100%|ββββββββββ| 290/290 [00:00<00:00, 8116.18it/s]\n32/256 docs 1 s\n64/256 docs 1 s\n80/256 docs 1 s\n112/256 docs 2 s\n128/256 docs 2 s\n160/256 docs 3 s\n192/256 docs 3 s\n208/256 docs 3 s\n240/256 docs 4 s\n256/256 docs 4 s\ntok_s 32980\nloss 2.8552\n","exit_code":0,"status":"completed"}}{"type":"item.started","item":{"id":"item_7","type":"command_execution","command":"/bin/bash -lc 'styx status a10-3'","aggregated_output":"","exit_code":null,"status":"in_progress"}}{"type":"item.started","item":{"id":"item_8","type":"command_execution","command":"/bin/bash -lc 'styx logs a10-3 --tail 30'","aggregated_output":"","exit_code":null,"status":"in_progress"}}{"type":"item.completed","item":{"id":"item_7","type":"command_execution","command":"/bin/bash -lc 'styx status a10-3'","aggregated_output":"a10-3 SUCCEEDED limit_s 900 seconds 9.8 exit 0 peak_gpu_mb 13589 gpu_util_mean 40.7 usd 0.0035\n","exit_code":0,"status":"completed"}}{"type":"item.completed","item":{"id":"item_8","type":"command_execution","command":"/bin/bash -lc 'styx logs a10-3 --tail 30'","aggregated_output":"device cuda\nWarning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n[transformers] Token indices sequence length is longer than the specified maximum sequence length for this model (142704 > 131072). Running this sequence through the model will result in indexing errors\n[transformers] `torch_dtype` is deprecated! Use `dtype` instead!\n\nLoading weights: 0%| | 0/290 [00:00<?, ?it/s]\nLoading weights: 100%|ββββββββββ| 290/290 [00:00<00:00, 8116.18it/s]\n32/256 docs 1 s\n64/256 docs 1 s\n80/256 docs 1 s\n112/256 docs 2 s\n128/256 docs 2 s\n160/256 docs 3 s\n192/256 docs 3 s\n208/256 docs 3 s\n240/256 docs 4 s\n256/256 docs 4 s\ntok_s 32980\nloss 2.8552\n","exit_code":0,"status":"completed"}}{"type":"item.completed","item":{"id":"item_9","type":"agent_message","text":"The requested evaluation completed on the A10.\n\nLOSS=2.8552"}}{"type":"turn.completed","usage":{"input_tokens":127571,"cached_input_tokens":99328,"cache_write_input_tokens":0,"output_tokens":720,"reasoning_output_tokens":119}}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152"""Mean next-token loss of a causal language model on the first --docs chunks of --ctx tokens ofthe WikiText-103 training text.
python loss.py --model Qwen/Qwen2.5-1.5B --docs 2000 --ctx 1024 [--batch 16]"""
import argparseimport time
import torchfrom datasets import load_datasetfrom transformers import AutoModelForCausalLM, AutoTokenizer
ROWS = 2000
def chunks(tok, docs, ctx): rows = load_dataset("Salesforce/wikitext", "wikitext-103-raw-v1", split="train")["text"] ids = [] for i in range(0, len(rows), ROWS): ids += tok("".join(rows[i : i + ROWS]), add_special_tokens=False)["input_ids"] if len(ids) >= docs * ctx: break return torch.tensor(ids[: docs * ctx]).view(docs, ctx)
def main(): ap = argparse.ArgumentParser() ap.add_argument("--model", required=True) ap.add_argument("--docs", type=int, required=True) ap.add_argument("--ctx", type=int, required=True) ap.add_argument("--batch", type=int, default=16) a = ap.parse_args() dev = "cuda" if torch.cuda.is_available() else "cpu" print(f"device {dev}", flush=True) x = chunks(AutoTokenizer.from_pretrained(a.model), a.docs, a.ctx) m = AutoModelForCausalLM.from_pretrained(a.model, torch_dtype=torch.bfloat16).to(dev).eval() total, t, said = 0.0, time.time(), 0 with torch.no_grad(): for i in range(0, a.docs, a.batch): b = x[i : i + a.batch].to(dev) total += m(input_ids=b, labels=b).loss.item() * len(b) done = i + len(b) if done * 10 // a.docs > said: said = done * 10 // a.docs print(f"{done}/{a.docs} docs {time.time() - t:.0f} s", flush=True) print(f"tok_s {a.docs * a.ctx / (time.time() - t):.0f}") print(f"loss {total / a.docs:.4f}")
if __name__ == "__main__": main()post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/answer.txtAdded+3
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/before/answer.txtAdded+9
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/before/clock.txtAdded+4
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/before/transcript.jsonlAdded+4
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/clock.txtAdded+20
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/episode.jsonAdded+86
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/ledger.jsonlAdded+7
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/stderr.txtAdded+1
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/transcript.jsonlAdded+20
post/20261122-5aab9f0/codex-gpt-6-luna/0.5B-256x512-1/work/loss.pyAdded+52