Spaces:
Sleeping
Sleeping
Commit History
-
fix(train): v5 β JSON preprocessor + dual-token for friend's accountβ
- action_parser: add _preprocess_json() to fix two v4 error patterns: literal control chars inside JSON strings (Invalid control character) and Python # comments after field values (Expecting ',' delimiter) - submit_training_job: dual-token support β HF_TOKEN (yours) for cloning Space + pushing model inside job; SUBMIT_TOKEN (friend's) for billing via run_job(); TOTAL_STEPS=150, TIMEOUT=10h (~$11 on l40sx1) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c9d0dd5
-
fix(train): v3 β repair truncated JSON + earlier evals + fix GGUF pathβ
- action_parser: add _repair_truncated_json() β if model outputs JSON missing closing }, count unmatched quotes and append "} to recover. Prevents the v2 collapse pattern where model learned good behaviors but forgot to close braces. - config: eval_interval 50β20, ckpt_interval 50β20 β first best-checkpoint save at step 20 instead of step 50 (v2 best phase was steps 20-30, never captured) - export_gguf: fix Unsloth output path β Unsloth saves to {model}_gguf/ dir, not to the out_dir argument. Now finds the generated file via glob and moves it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1624ad5 -
fix(train): v2 β fix collapse root causes + best-ckpt tracking + GGUF exportβ
- config: kl_coef 0.04β0.1, max_new_tokens 96, ckpt_interval 50, step/terminal weights 0.50/0.50, total_steps 500 - action_parser: greedy regex to capture full JSON (was non-greedy, stopped at first }) - run_train: early stopping on 5 consecutive collapsed log intervals; best checkpoint saved to checkpoints/best/ with best_score.txt - model_utils: save_checkpoint accepts optional tag= for named checkpoint dirs - start_training: pick best/ checkpoint first (not always "final"); remove --no_wandb; add Step 8.5 GGUF Q4_K_M export + push to separate HF repo - export_gguf: new module β loads merged model, saves GGUF Q4_K_M, pushes with README (ollama + llama-cpp-python compatible) - submit_training_job: SKIP_SFT=0, TOTAL_STEPS=500, HF_REPO=v2, HF_REPO_GGUF separate repo, pass GGUF_EXPORT env to job Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>cacac63
-
feat(round2): DB-grounded multi_domain task with 30-ticket curriculum stageβ
Adds a full DB-backed grounded response system as the final curriculum stage, preventing model memorisation and teaching the agent to query real data before responding rather than hallucinating facts. Environment: - env/user_db.py: in-memory DB with 23 users and 40+ orders across food_delivery, e_commerce, and ticket_booking domains - env/models.py: new query_user_profile and query_order_details action types, retrieved_data field on Observation, customer_email/related_order_ids on Ticket - env/environment.py: DB query routing, _handle_query_action(), multi_domain task config, fixed hierarchical routing via TASK_CONFIG lookup - env/reward_engine.py: compute_db_signals() with hallucination_penalty, grounded_response_bonus, query_match_bonus, wasted_query_penalty, not_found_handling_bonus; integrated into both reward functions - env/ticket_store.py: 30 multi_domain tickets (MDTKT-001 to MDTKT-030) covering food delivery, e-commerce, ticket booking, NOT_FOUND edge cases, suspeβ¦33c927a
-
fix: Qwen3-8B-Instruct support β model name, think token strippingβ
- train/config.py: set model_name to unsloth/Qwen3-8B - train/action_parser.py: strip <think>...</think> blocks before JSON extraction β prevents fake JSON inside think blocks from being parsed as the action (critical Qwen3 edge case) - train/model_utils.py: strip think tokens from completion_for_training so GRPO gradients train only on the JSON action, not chain-of-thought Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3780968 -
feat: hackathon improvements β benchmark dashboard, GRPO training pipeline, grader fixesβ
- Frontend: Next.js demo UI with Auto-Play / Chat-as-Customer / Manual Agent modes - Frontend: /dashboard/benchmark page β before/after comparison (bar chart, radar, table) - Backend: GET /benchmark/baseline endpoint returning per-task baseline metrics (8 tasks, 7 signals) - GRPO training pipeline: train/ (11 files) β config, env_client, prompt_builder, action_parser, model_utils, reward_aggregator, rollout_collector, grpo_trainer, curriculum, evaluate, run_train - SFT warm-start: train/sft_warmstart.py β collects gold episodes, runs TRL SFTTrainer before GRPO - LoRA merge: train/merge_lora.py β correct Unsloth merge path (avoids 4-bit upcast degradation) - Grader fix: task_hard.py β add hostile-tone penalty (Γ0.4); task_curriculum_basic.py same - README: updated reward function table (7 signals + anti-gaming guards), before/after results table, training quick-start, fixed model name (nemotron β meta/llama-3.3-70b-instruct) - docker-compose.yml: forward NVIDIA_API_KEY/MODEL env varβ¦b4289f9