executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
palm-modelingOperate the PaLM transformer core in palm-rlhf-pytorch: construction, loss/generation checks, LoRA finetuning scopes, flash-attention choices, and reference-only pretraining.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a task is about the package's base PaLM transformer rather than reward models or policy-optimization trainer loops.
PaLM model for autoregressive language modeling or non-causal embedding use.scripts/tiny_palm_smoke.py.PaLM.forward, PaLM.generate, sampling helpers, embedding/logit return modes, save/load, dropout changes, and LoRA finetune scopes.flash_attn=True; this package uses PyTorch scaled-dot-product attention, not the external flash-attn package.reward-modeling sub-skill.RLHFTrainer, or post-training loops; route those to the policy-optimization sub-skill.references/api-reference.md.references/pretraining-workflows.md.references/troubleshooting.md.python sub-skills/palm-modeling/scripts/tiny_palm_smoke.py --device auto --check-lora
If running from inside this sub-skill directory, use:
python scripts/tiny_palm_smoke.py --device auto --check-lora
torch.device, move model and tensors with .to(device), and avoid README-style unconditional .cuda() calls on CPU hosts.generate(seq_len, prompt=...) treats seq_len as the target total length. With the default return_seq_without_prompt=True, the returned tensor is only the generated suffix of length seq_len - prompt_len when seq_len > prompt_len.palm.palm_parameters() for base pretraining optimizers and palm.finetune_parameters(scope) only after creating a matching LoRA scope.flash_attn=True compares the torch SDPA backend, not a separate flash-attn dependency. Treat it as an optional acceleration choice.return_logits_with_embedding=True or return_seq_without_prompt=False.finetune_parameters(scope), then merge intentionally.flash_attn=True?" → yes only when you are intentionally comparing the SDPA path.lion_pytorch extra..to(device) in examples and avoid unconditional .cuda() calls.A correct tiny check should:
PaLM on the selected device;backward();(batch, seq_len, num_tokens);(batch, seq_len, dim);seq_len - prompt_len when the prompt is omitted from the return;references/api-reference.md for verified signatures and generation semantics.references/pretraining-workflows.md for the distilled training recipe and why it is reference-only.references/troubleshooting.md for CPU/device, flash-attn, generation, and LoRA issues.scripts/tiny_palm_smoke.py for the safe runnable smoke check.