Gemini 3.7 Flash · Training

T05 · Training adapt

Valid

LFM2-1.2B model adapt training 1dev · Model Adaptation

1.00×PERFORMANCE RATIO
739TOOL EVENTS
1TEXT PATCHES
0BINARY NAMES

01 / PROCESS MAP

Tool activity

Each row shows one agent’s tool events in its own recorded order. Colors show broad activities; bar widths do not represent duration.

Main agentGemini 3.7 Flash · 739 visible calls

InspectEditValidateExecuteBuildProfileRollbackOther
280Inspect
2Edit
4Validate
453Other

02 / EVENT SEQUENCE

Event timeline

Requests are grouped by agent, activity and topic. Delegations open into child branches. Summaries describe visible requests; tool errors and missing responses are flagged. A recorded response does not establish command success or a performance improvement.

Show event timelineHide event timeline322 groups · 739 calls

Scroll within this panel to view all events. Command sketches retain familiar programs and options. Values become <val> or <n>; paths, addresses and script bodies are hidden as <path>, <url> and <script>.

Main agent

  1. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0001–#0001

    echo <val>ls -l -a <val>
  2. Inspect · Task requirements

    Requested file and log inspection and workspace inspection related to task requirements.

    3 calls · #0002–#0004

    Read <path>ls -l -a <path> <path> <path> <path> <path> <path>
  3. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0005–#0006

    Read <path>
  4. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0007–#0007

    Read <path>
  5. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0008–#0008

    Read <path>
  6. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    2 calls · #0009–#0010

    Read <path>
  7. Inspect · Source & workspace

    Requested file and log inspection and workspace inspection related to source & workspace.

    8 calls · #0011–#0018

    Read <path>ls -l -a <path> <path>
  8. Other · Source & workspace

    Requested script or workload execution, environment setup or inspection and source searches related to source & workspace.

    2 calls · #0019–#0020

    bash <script>envgrep <val>
  9. Inspect · Source & workspace

    Requested workspace inspection and file and log inspection related to source & workspace.

    2 calls · #0021–#0022

    ls -l -a <path>Read <path>
  10. Other · Source & workspace

    1 tool error

    Requested script or workload execution and task coordination related to source & workspace.

    2 calls · #0023–#0024

    python3 -c <script>Manage task <task>
  11. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0025–#0025

    Read <path>
  12. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0026–#0026

    Manage task <task>
  13. Inspect · Checkpoints & weight state

    Requested workspace inspection related to checkpoints & weight state.

    1 call · #0027–#0027

    ls -l -a <path> <path> <path>
  14. Other · Source & workspace

    1 tool error

    Requested task coordination and script or workload execution related to source & workspace.

    7 calls · #0028–#0034

    Manage task <task>which <val>python3 -c <script>
  15. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0035–#0035

    Read <path>
  16. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0036–#0036

    Manage task <task>
  17. Inspect · Source & workspace

    Requested workspace inspection and file and log inspection related to source & workspace.

    2 calls · #0037–#0038

    Find <pattern>Read <path>
  18. Other · Source & workspace

    1 tool error

    Requested task coordination, script or workload execution and environment setup or inspection related to source & workspace.

    5 calls · #0039–#0043

    Manage task <task>python3 -c <script>env <vars> python3 -c <script>
  19. Inspect · Source & workspace

    Requested workspace inspection and file and log inspection related to source & workspace.

    2 calls · #0044–#0045

    ls -l -a <path>Read <path>
  20. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0046–#0046

    Manage task <task>
  21. Other · Device memory

    Requested runtime inspection related to device memory.

    1 call · #0047–#0047

    npu-smi info
  22. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0048–#0048

    Read <path>
  23. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0049–#0049

    python3 -B <script> <val>
  24. Inspect · Source & workspace

    Requested file and log inspection and source searches related to source & workspace.

    7 calls · #0050–#0056

    Read <path>Search <pattern> <path>
  25. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0057–#0057

    python3 -c <script>
  26. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    4 calls · #0058–#0061

    Read <path>
  27. Inspect · Checkpoints & weight state

    Requested file and log inspection related to checkpoints & weight state.

    7 calls · #0062–#0068

    Read <path>
  28. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    3 calls · #0069–#0071

    Read <path>
  29. Inspect · Checkpoints & weight state

    Requested source searches related to checkpoints & weight state.

    1 call · #0072–#0072

    Search <pattern> <path>
  30. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0073–#0073

    Read <path>
  31. Inspect · Convolution & sequence boundaries

    Requested source searches related to convolution & sequence boundaries.

    1 call · #0074–#0074

    Search <pattern> <path>
  32. Inspect · Source & workspace

    Requested source searches and file and log inspection related to source & workspace.

    5 calls · #0075–#0079

    Search <pattern> <path>Read <path>
  33. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    8 calls · #0080–#0087

    Read <path>
  34. Inspect · Source & workspace

    1 tool error

    Requested file and log inspection, source searches and workspace inspection related to source & workspace.

    10 calls · #0088–#0097

    Read <path>Search <pattern> <path>Find <pattern>
  35. Inspect · Checkpoints & weight state

    Requested file and log inspection related to checkpoints & weight state.

    1 call · #0098–#0098

    Read <path>
  36. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0099–#0100

    Read <path>
  37. Inspect · Checkpoints & weight state

    Requested source searches and file and log inspection related to checkpoints & weight state.

    2 calls · #0101–#0102

    Search <pattern> <path>Read <path>
  38. Other · Attention kernels

    1 tool error

    Requested tool activity related to attention kernels.

    1 call · #0103–#0103

    shell <script>
  39. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0104–#0104

    Read <path>
  40. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0105–#0105

    Manage task <task>
  41. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0106–#0106

    Read <path>
  42. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0107–#0107

    Manage task <task>
  43. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0108–#0108

    Read <path>
  44. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0109–#0109

    Manage task <task>
  45. Other · Attention kernels

    Requested tool activity related to attention kernels.

    1 call · #0110–#0110

    shell <script>
  46. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0111–#0111

    Read <path>
  47. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0112–#0112

    Manage task <task>
  48. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0113–#0114

    Read <path>
  49. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0115–#0115

    Manage task <task>
  50. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    5 calls · #0116–#0120

    Read <path>
  51. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0121–#0121

    Manage task <task>
  52. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0122–#0123

    Read <path>
  53. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0124–#0124

    Manage task <task>
  54. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0125–#0125

    Read <path>
  55. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0126–#0126

    Manage task <task>
  56. Edit · Source & workspace

    1 tool error

    Requested code edits related to source & workspace.

    1 call · #0127–#0127

    Write <path>
  57. Other · Convolution & sequence boundaries

    Requested script or workload execution related to convolution & sequence boundaries.

    1 call · #0128–#0128

    python3 -c <script>
  58. Other · Runtime processes

    Requested tool activity related to runtime processes.

    1 call · #0129–#0129

    shell <script>
  59. Other · Attention kernels

    Requested tool activity related to attention kernels.

    2 calls · #0130–#0131

    shell <script>
  60. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0132–#0132

    bash <script>
  61. Inspect · Checkpoints & weight state

    Requested file and log inspection related to checkpoints & weight state.

    1 call · #0133–#0133

    Read <path>
  62. Edit · Checkpoints & weight state

    Requested code edits related to checkpoints & weight state.

    1 call · #0134–#0134

    Edit <path>
  63. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0135–#0135

    bash <script>
  64. Other · Source & workspace

    Requested workspace file updates related to source & workspace.

    1 call · #0136–#0136

    rm -rf <path>
  65. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0137–#0137

    bash <script>
  66. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0138–#0138

    ls -l -a <path>
  67. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0139–#0139

    Manage task <task>
  68. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0140–#0140

    ls -l -a <path>
  69. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0141–#0141

    Manage task <task>
  70. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0142–#0142

    ls -l -a <path>
  71. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0143–#0143

    Manage task <task>
  72. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0144–#0144

    ls -l -a <path>
  73. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0145–#0145

    Read <path>
  74. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0146–#0146

    ls -l -a <path>
  75. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0147–#0147

    Read <path>
  76. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0148–#0148

    Manage task <task>
  77. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0149–#0150

    Read <path>
  78. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0151–#0151

    Manage task <task>
  79. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    3 calls · #0152–#0154

    Read <path>
  80. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0155–#0155

    Manage task <task>
  81. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0156–#0157

    Read <path>
  82. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0158–#0158

    Manage task <task>
  83. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    4 calls · #0159–#0162

    Read <path>
  84. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0163–#0163

    Manage task <task>
  85. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    9 calls · #0164–#0172

    Read <path>
  86. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0173–#0173

    Manage task <task>
  87. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0174–#0175

    Read <path>
  88. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0176–#0176

    Manage task <task>
  89. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0177–#0178

    Read <path>
  90. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0179–#0179

    Manage task <task>
  91. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0180–#0180

    Read <path>
  92. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0181–#0181

    Manage task <task>
  93. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0182–#0182

    Read <path>
  94. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0183–#0183

    Manage task <task>
  95. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0184–#0185

    Read <path>
  96. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0186–#0186

    Manage task <task>
  97. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0187–#0187

    Read <path>
  98. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0188–#0188

    Manage task <task>
  99. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0189–#0189

    Read <path>
  100. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0190–#0190

    Manage task <task>
  101. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0191–#0191

    Read <path>
  102. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0192–#0192

    Manage task <task>
  103. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0193–#0194

    Read <path>
  104. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0195–#0195

    Manage task <task>
  105. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0196–#0196

    Read <path>
  106. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0197–#0197

    Manage task <task>
  107. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0198–#0198

    Read <path>
  108. Other · Source & workspace

    Requested task coordination and workspace file updates related to source & workspace.

    2 calls · #0199–#0200

    Manage task <task>rm -rf <path>
  109. Other · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0201–#0201

    bash <script>
  110. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0202–#0202

    ls -l -a <path>
  111. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0203–#0203

    Manage task <task>
  112. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0204–#0204

    ls -l -a <path>
  113. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0205–#0205

    Manage task <task>
  114. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0206–#0206

    ls -l -a <path>
  115. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0207–#0207

    Manage task <task>
  116. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    2 calls · #0208–#0209

    ls -l -a <path>
  117. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0210–#0210

    Manage task <task>
  118. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0211–#0211

    ls -l -a <path>
  119. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0212–#0212

    Manage task <task>
  120. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0213–#0213

    ls -l -a <path>
  121. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0214–#0214

    Manage task <task>
  122. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0215–#0215

    ls -l -a <path>
  123. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0216–#0216

    Manage task <task>
  124. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0217–#0217

    ls -l -a <path>
  125. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0218–#0218

    Manage task <task>
  126. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0219–#0219

    ls -l -a <path>
  127. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0220–#0220

    Read <path>
  128. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    2 calls · #0221–#0222

    ls -l -a <path>
  129. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0223–#0223

    Manage task <task>
  130. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0224–#0224

    ls -l -a <path>
  131. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0225–#0225

    Manage task <task>
  132. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    2 calls · #0226–#0227

    ls -l -a <path>
  133. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0228–#0228

    Manage task <task>
  134. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0229–#0229

    ls -l -a <path>
  135. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0230–#0230

    Read <path>
  136. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0231–#0231

    Manage task <task>
  137. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0232–#0233

    Read <path>
  138. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0234–#0234

    Manage task <task>
  139. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0235–#0236

    Read <path>
  140. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0237–#0237

    Manage task <task>
  141. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0238–#0239

    Read <path>
  142. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0240–#0240

    Manage task <task>
  143. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0241–#0242

    Read <path>
  144. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0243–#0243

    Manage task <task>
  145. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0244–#0245

    Read <path>
  146. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0246–#0246

    Manage task <task>
  147. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0247–#0248

    Read <path>
  148. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0249–#0249

    Manage task <task>
  149. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0250–#0251

    Read <path>
  150. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0252–#0252

    Manage task <task>
  151. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0253–#0253

    Read <path>
  152. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0254–#0254

    Manage task <task>
  153. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0255–#0256

    Read <path>
  154. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0257–#0257

    Manage task <task>
  155. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0258–#0258

    Read <path>
  156. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0259–#0259

    Manage task <task>
  157. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    3 calls · #0260–#0262

    Read <path>
  158. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0263–#0263

    Manage task <task>
  159. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0264–#0264

    Read <path>
  160. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0265–#0265

    Manage task <task>
  161. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0266–#0266

    Read <path>
  162. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0267–#0267

    Manage task <task>
  163. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    3 calls · #0268–#0270

    Read <path>
  164. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0271–#0271

    Manage task <task>
  165. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0272–#0272

    Read <path>
  166. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0273–#0273

    Manage task <task>
  167. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0274–#0274

    Read <path>
  168. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0275–#0275

    Manage task <task>
  169. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0276–#0276

    Read <path>
  170. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0277–#0277

    Manage task <task>
  171. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0278–#0278

    Read <path>
  172. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0279–#0279

    Manage task <task>
  173. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0280–#0281

    Read <path>
  174. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0282–#0282

    Manage task <task>
  175. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    4 calls · #0283–#0286

    Read <path>
  176. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0287–#0287

    Manage task <task>
  177. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0288–#0289

    Read <path>
  178. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0290–#0290

    Manage task <task>
  179. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0291–#0292

    Read <path>
  180. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0293–#0293

    Manage task <task>
  181. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0294–#0294

    Read <path>
  182. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0295–#0295

    Manage task <task>
  183. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0296–#0296

    Read <path>
  184. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0297–#0297

    Manage task <task>
  185. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0298–#0298

    ls -l -a <path>
  186. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0299–#0299

    Read <path>
  187. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0300–#0300

    ls -l -a <path>
  188. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0301–#0301

    Manage task <task>
  189. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0302–#0302

    ls -l -a <path>
  190. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0303–#0303

    Manage task <task>
  191. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0304–#0304

    ls -l -a <path>
  192. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0305–#0305

    Read <path>
  193. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0306–#0306

    Manage task <task>
  194. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0307–#0307

    Read <path>
  195. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0308–#0308

    Manage task <task>
  196. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0309–#0310

    Read <path>
  197. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0311–#0311

    Manage task <task>
  198. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0312–#0313

    Read <path>
  199. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0314–#0314

    Manage task <task>
  200. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0315–#0316

    Read <path>
  201. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0317–#0317

    Manage task <task>
  202. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0318–#0319

    Read <path>
  203. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0320–#0320

    Manage task <task>
  204. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0321–#0322

    Read <path>
  205. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0323–#0323

    Manage task <task>
  206. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0324–#0325

    Read <path>
  207. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0326–#0326

    Manage task <task>
  208. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0327–#0328

    Read <path>
  209. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0329–#0329

    Manage task <task>
  210. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0330–#0330

    Read <path>
  211. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0331–#0331

    Manage task <task>
  212. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0332–#0333

    Read <path>
  213. Other · Source & workspace

    Requested task coordination related to source & workspace.

    4 calls · #0334–#0337

    Manage task <task>
  214. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0338–#0338

    Read <path>
  215. Other · Source & workspace

    Requested task coordination and workspace file updates related to source & workspace.

    3 calls · #0339–#0341

    Manage task <task>rm -rf <path>
  216. Other · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0342–#0342

    bash <script>
  217. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0343–#0343

    ls -l -a <path>
  218. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0344–#0344

    Manage task <task>
  219. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0345–#0345

    ls -l -a <path>
  220. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0346–#0346

    Manage task <task>
  221. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0347–#0347

    ls -l -a <path>
  222. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0348–#0348

    Manage task <task>
  223. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0349–#0349

    ls -l -a <path>
  224. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0350–#0350

    Manage task <task>
  225. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0351–#0351

    Read <path>
  226. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0352–#0352

    Manage task <task>
  227. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0353–#0353

    Read <path>
  228. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0354–#0354

    Manage task <task>
  229. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0355–#0355

    Read <path>
  230. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0356–#0356

    Manage task <task>
  231. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0357–#0357

    Read <path>
  232. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0358–#0358

    Manage task <task>
  233. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0359–#0359

    Read <path>
  234. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0360–#0360

    Manage task <task>
  235. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0361–#0361

    Read <path>
  236. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0362–#0362

    Manage task <task>
  237. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0363–#0363

    Read <path>
  238. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0364–#0364

    Manage task <task>
  239. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0365–#0365

    Read <path>
  240. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0366–#0366

    Manage task <task>
  241. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0367–#0367

    Read <path>
  242. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0368–#0368

    Manage task <task>
  243. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0369–#0369

    Read <path>
  244. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0370–#0370

    Manage task <task>
  245. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0371–#0371

    Read <path>
  246. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0372–#0372

    Manage task <task>
  247. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0373–#0373

    Read <path>
  248. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0374–#0374

    Manage task <task>
  249. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0375–#0375

    Read <path>
  250. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0376–#0376

    Manage task <task>
  251. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0377–#0377

    Read <path>
  252. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0378–#0378

    Manage task <task>
  253. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0379–#0380

    Read <path>
  254. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0381–#0381

    Manage task <task>
  255. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0382–#0382

    Read <path>
  256. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0383–#0383

    Manage task <task>
  257. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0384–#0384

    Read <path>
  258. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0385–#0385

    Manage task <task>
  259. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0386–#0386

    Read <path>
  260. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0387–#0387

    Manage task <task>
  261. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0388–#0388

    Read <path>
  262. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0389–#0389

    Manage task <task>
  263. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0390–#0390

    Read <path>
  264. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0391–#0391

    Manage task <task>
  265. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0392–#0392

    Read <path>
  266. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0393–#0393

    Manage task <task>
  267. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0394–#0394

    Read <path>
  268. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0395–#0395

    Manage task <task>
  269. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0396–#0396

    Read <path>
  270. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    2 calls · #0397–#0398

    ls -l -a <path>
  271. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0399–#0399

    Manage task <task>
  272. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0400–#0400

    ls -l -a <path>
  273. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0401–#0401

    Read <path>
  274. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0402–#0402

    Manage task <task>
  275. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0403–#0403

    Read <path>
  276. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0404–#0404

    Manage task <task>
  277. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0405–#0405

    Read <path>
  278. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0406–#0406

    Manage task <task>
  279. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0407–#0407

    Read <path>
  280. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0408–#0408

    Manage task <task>
  281. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0409–#0409

    Read <path>
  282. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0410–#0410

    Manage task <task>
  283. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0411–#0411

    Read <path>
  284. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0412–#0412

    Manage task <task>
  285. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0413–#0413

    Read <path>
  286. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0414–#0414

    Manage task <task>
  287. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0415–#0415

    Read <path>
  288. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0416–#0416

    Manage task <task>
  289. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0417–#0418

    Read <path>
  290. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0419–#0419

    Manage task <task>
  291. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0420–#0420

    Read <path>
  292. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0421–#0421

    Manage task <task>
  293. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0422–#0422

    Read <path>
  294. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0423–#0423

    Manage task <task>
  295. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0424–#0425

    Read <path>
  296. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0426–#0426

    Manage task <task>
  297. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0427–#0427

    Read <path>
  298. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0428–#0428

    Manage task <task>
  299. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0429–#0429

    Read <path>
  300. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0430–#0430

    Manage task <task>
  301. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0431–#0431

    Read <path>
  302. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0432–#0432

    Manage task <task>
  303. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0433–#0433

    Read <path>
  304. Other · Source & workspace

    Requested task coordination related to source & workspace.

    4 calls · #0434–#0437

    Manage task <task>
  305. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    2 calls · #0438–#0439

    Read <path>
  306. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0440–#0440

    bash <script>
  307. Validate · Benchmark & validation setup

    Requested workspace file updates and script or workload execution related to benchmark & validation setup.

    1 call · #0441–#0441

    rm -rf <path>bash <script>
  308. Other · Source & workspace

    Requested task coordination related to source & workspace.

    2 calls · #0442–#0443

    Manage task <task>
  309. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0444–#0444

    Read <path>
  310. Other · Source & workspace

    Requested task coordination related to source & workspace.

    4 calls · #0445–#0448

    Manage task <task>
  311. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0449–#0449

    Read <path>
  312. Other · Source & workspace

    Requested task coordination related to source & workspace.

    4 calls · #0450–#0453

    Manage task <task>
  313. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0454–#0454

    Read <path>
  314. Other · Source & workspace

    Requested task coordination related to source & workspace.

    43 calls · #0455–#0497

    Manage task <task>
  315. Other · Benchmark & validation setup

    Requested workspace file updates and script or workload execution related to benchmark & validation setup.

    1 call · #0498–#0498

    rm -rf <path>bash <script>
  316. Other · Source & workspace

    Requested task coordination related to source & workspace.

    133 calls · #0499–#0631

    Manage task <task>
  317. Other · Benchmark & validation setup

    Requested workspace file updates and script or workload execution related to benchmark & validation setup.

    1 call · #0632–#0632

    rm -rf <path>bash <script>
  318. Other · Source & workspace

    Requested task coordination related to source & workspace.

    101 calls · #0633–#0733

    Manage task <task>
  319. Inspect · Source & workspace

    Requested repository inspection and workspace inspection related to source & workspace.

    3 calls · #0734–#0736

    git statusls -l -a <path>
  320. Other · Checkpoints & weight state

    Requested workspace file updates related to checkpoints & weight state.

    1 call · #0737–#0737

    chmod -R <n> <path> <path> <path>
  321. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0738–#0738

    ls -l -a <path>
  322. Other · Device memory

    Requested runtime inspection related to device memory.

    1 call · #0739–#0739

    npu-smi info

03 / CANDIDATE ARTIFACT

Text patches & binary names

Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.

mindspeed_llm · 4 changed files

Base commit: 72c49a6260c73669678b8f39b1ba41a4789bb555

diff --git a/mindspeed_llm/core/models/lfm2/__init__.py b/mindspeed_llm/core/models/lfm2/__init__.pynew file mode 100755index 0000000000000000000000000000000000000000..98983fdec9163ba9a082b60f1cbcde4b469cb75a--- /dev/null+++ b/mindspeed_llm/core/models/lfm2/__init__.py@@ -0,0 +1,3 @@+from .short_conv import ShortConv, ShortConvSubmodules++__all__ = ["ShortConv", "ShortConvSubmodules"]diff --git a/mindspeed_llm/core/models/lfm2/short_conv.py b/mindspeed_llm/core/models/lfm2/short_conv.pynew file mode 100755index 0000000000000000000000000000000000000000..055e97c757b27eb1806a0cc90592d3c9e380a102--- /dev/null+++ b/mindspeed_llm/core/models/lfm2/short_conv.py@@ -0,0 +1,88 @@+# Copyright (c) 2025, HUAWEI CORPORATION.  All rights reserved.+from dataclasses import dataclass+from typing import Union++import torch+import torch.nn as nn+from megatron.core.transformer.module import MegatronModule+from megatron.core.transformer.spec_utils import ModuleSpec, build_module+from megatron.core.transformer.transformer_config import TransformerConfig+++@dataclass+class ShortConvSubmodules:+    in_proj: Union[ModuleSpec, type] = None+    out_proj: Union[ModuleSpec, type] = None+++class ShortConv(MegatronModule):+    """+    LFM2 Short Convolution layer for hybrid MCore models.+    """++    def __init__(+        self,+        config: TransformerConfig,+        submodules: ShortConvSubmodules,+        layer_number: int = 1,+        conv_kernel: int = 3,+        **kwargs,+    ):+        super().__init__(config=config)+        self.config = config+        self.layer_number = layer_number+        self.conv_kernel = getattr(config, "conv_kernel", conv_kernel)+        hidden_size = config.hidden_size++        self.in_proj = build_module(+            submodules.in_proj,+            hidden_size,+            3 * hidden_size,+            config=self.config,+            init_method=self.config.init_method,+            gather_output=False,+            bias=self.config.add_bias_linear,+            skip_bias_add=False,+            is_expert=False,+        )++        self.conv = nn.Conv1d(+            in_channels=hidden_size,+            out_channels=hidden_size,+            kernel_size=self.conv_kernel,+            groups=hidden_size,+            bias=False,+            padding=self.conv_kernel - 1,+        )++        self.out_proj = build_module(+            submodules.out_proj,+            hidden_size,+            hidden_size,+            config=self.config,+            init_method=self.config.output_layer_init_method,+            bias=self.config.add_bias_linear,+            input_is_parallel=True,+            skip_bias_add=True,+            is_expert=False,+        )++    def forward(+        self,+        hidden_states: torch.Tensor,+        *args,+        **kwargs,+    ):+        seq_len, batch_size, hidden_size = hidden_states.shape++        projected, _ = self.in_proj(hidden_states)+        B, C, x = torch.chunk(projected, 3, dim=-1)+        Bx = B * x++        Bx_conv = Bx.permute(1, 2, 0).contiguous()+        conv_out = self.conv(Bx_conv)[..., :seq_len]+        conv_out = conv_out.permute(2, 0, 1).contiguous()++        y = C * conv_out+        out, bias = self.out_proj(y)+        return out, biasdiff --git a/mindspeed_llm/tasks/checkpoint/lfm2_convert.py b/mindspeed_llm/tasks/checkpoint/lfm2_convert.pynew file mode 100755index 0000000000000000000000000000000000000000..415134896c7e1659427796ecb4f465f8169e8c41--- /dev/null+++ b/mindspeed_llm/tasks/checkpoint/lfm2_convert.py@@ -0,0 +1,310 @@+# Copyright (c) 2025, HUAWEI CORPORATION.  All rights reserved.+import argparse+import json+import os+import shutil+from pathlib import Path+from typing import Dict++import torch+from safetensors import safe_open+from safetensors.torch import save_file+++DEFAULT_LAYER_TYPES = [+    "conv", "conv", "full_attention", "conv",+    "conv", "full_attention", "conv", "conv",+    "full_attention", "conv", "full_attention", "conv",+    "full_attention", "conv", "full_attention", "conv",+]+++def hf_to_mcore(load_dir: str, save_dir: str):+    load_path = Path(load_dir)+    save_path = Path(save_dir)++    config_path = load_path / "config.json"+    if config_path.exists():+        with open(config_path, "r", encoding="utf-8") as f:+            config = json.load(f)+    else:+        config = {}++    layer_types = config.get("layer_types", DEFAULT_LAYER_TYPES)+    hidden_size = config.get("hidden_size", 2048)+    num_heads = config.get("num_attention_heads", 32)+    num_kv_heads = config.get("num_key_value_heads", 8)+    head_dim = hidden_size // num_heads+    num_groups = num_kv_heads+    heads_per_group = num_heads // num_groups+    q_group_dim = heads_per_group * head_dim+    kv_group_dim = head_dim+    total_group_dim = q_group_dim + 2 * kv_group_dim+    ffn_size = 8192++    hf_weights: Dict[str, torch.Tensor] = {}+    safetensors_path = load_path / "model.safetensors"+    if safetensors_path.exists():+        with safe_open(safetensors_path, framework="pt", device="cpu") as f:+            for k in f.keys():+                hf_weights[k] = f.get_tensor(k)+    else:+        for fpath in sorted(load_path.glob("*.safetensors")):+            with safe_open(fpath, framework="pt", device="cpu") as f:+                for k in f.keys():+                    hf_weights[k] = f.get_tensor(k)++    mcore_weights: Dict[str, torch.Tensor] = {}+    if "model.embed_tokens.weight" in hf_weights:+        mcore_weights["embedding.word_embeddings.weight"] = hf_weights["model.embed_tokens.weight"].clone()+    if "model.embedding_norm.weight" in hf_weights:+        mcore_weights["decoder.final_layernorm.weight"] = hf_weights["model.embedding_norm.weight"].clone()++    for idx, ltype in enumerate(layer_types):+        op_norm_key = f"model.layers.{idx}.operator_norm.weight"+        if op_norm_key in hf_weights:+            mcore_weights[f"decoder.layers.{idx}.input_layernorm.weight"] = hf_weights[op_norm_key].clone()++        ffn_norm_key = f"model.layers.{idx}.ffn_norm.weight"+        if ffn_norm_key in hf_weights:+            mcore_weights[f"decoder.layers.{idx}.pre_mlp_layernorm.weight"] = hf_weights[ffn_norm_key].clone()++        w1_key = f"model.layers.{idx}.feed_forward.w1.weight"+        w3_key = f"model.layers.{idx}.feed_forward.w3.weight"+        w2_key = f"model.layers.{idx}.feed_forward.w2.weight"+        if w1_key in hf_weights and w3_key in hf_weights:+            w1 = hf_weights[w1_key]+            w3 = hf_weights[w3_key]+            mcore_weights[f"decoder.layers.{idx}.mlp.linear_fc1.weight"] = torch.cat([w1, w3], dim=0).clone()+        if w2_key in hf_weights:+            mcore_weights[f"decoder.layers.{idx}.mlp.linear_fc2.weight"] = hf_weights[w2_key].clone()++        if ltype == "full_attention":+            q_key = f"model.layers.{idx}.self_attn.q_proj.weight"+            k_key = f"model.layers.{idx}.self_attn.k_proj.weight"+            v_key = f"model.layers.{idx}.self_attn.v_proj.weight"+            if q_key in hf_weights and k_key in hf_weights and v_key in hf_weights:+                q = hf_weights[q_key]+                k = hf_weights[k_key]+                v = hf_weights[v_key]+                qkv = torch.empty((num_groups * total_group_dim, hidden_size), dtype=q.dtype)+                for g in range(num_groups):+                    qkv[g * total_group_dim : g * total_group_dim + q_group_dim] = q[g * q_group_dim : (g + 1) * q_group_dim]+                    qkv[g * total_group_dim + q_group_dim : g * total_group_dim + q_group_dim + kv_group_dim] = k[g * kv_group_dim : (g + 1) * kv_group_dim]+                    qkv[g * total_group_dim + q_group_dim + kv_group_dim : (g + 1) * total_group_dim] = v[g * kv_group_dim : (g + 1) * kv_group_dim]+                mcore_weights[f"decoder.layers.{idx}.self_attention.linear_qkv.weight"] = qkv++            out_proj_key = f"model.layers.{idx}.self_attn.out_proj.weight"+            if out_proj_key in hf_weights:+                mcore_weights[f"decoder.layers.{idx}.self_attention.linear_proj.weight"] = hf_weights[out_proj_key].clone()++            q_ln_key = f"model.layers.{idx}.self_attn.q_layernorm.weight"+            if q_ln_key in hf_weights:+                mcore_weights[f"decoder.layers.{idx}.self_attention.q_layernorm.weight"] = hf_weights[q_ln_key].clone()++            k_ln_key = f"model.layers.{idx}.self_attn.k_layernorm.weight"+            if k_ln_key in hf_weights:+                mcore_weights[f"decoder.layers.{idx}.self_attention.k_layernorm.weight"] = hf_weights[k_ln_key].clone()++        elif ltype == "conv":+            in_proj_key = f"model.layers.{idx}.conv.in_proj.weight"+            if in_proj_key in hf_weights:+                mcore_weights[f"decoder.layers.{idx}.self_attention.in_proj.weight"] = hf_weights[in_proj_key].clone()++            conv_key = f"model.layers.{idx}.conv.conv.weight"+            if conv_key in hf_weights:+                mcore_weights[f"decoder.layers.{idx}.self_attention.conv.weight"] = hf_weights[conv_key].clone()++            out_proj_key = f"model.layers.{idx}.conv.out_proj.weight"+            if out_proj_key in hf_weights:+                mcore_weights[f"decoder.layers.{idx}.self_attention.out_proj.weight"] = hf_weights[out_proj_key].clone()++    ckpt_dir = save_path / "iter_0000001" / "mp_rank_00"+    ckpt_dir.mkdir(parents=True, exist_ok=True)++    args = argparse.Namespace(+        num_layers=config.get("num_hidden_layers", 16),+        hidden_size=hidden_size,+        ffn_hidden_size=8192,+        num_attention_heads=num_heads,+        num_query_groups=num_groups,+        kv_channels=head_dim,+        seq_length=4096,+        max_position_embeddings=4096,+        padded_vocab_size=config.get("vocab_size", 65536),+        make_vocab_size_divisible_by=1,+        tensor_model_parallel_size=1,+        pipeline_model_parallel_size=1,+        position_embedding_type="rope",+        rotary_percent=1.0,+        rotary_base=config.get("rope_theta", 1000000),+        normalization="RMSNorm",+        norm_epsilon=config.get("norm_eps", 1e-5),+        swiglu=True,+        bf16=True,+        untie_embeddings_and_output_weights=False,+    )++    checkpoint = {+        "args": args,+        "checkpoint_version": 3.0,+        "iteration": 1,+        "model": mcore_weights,+    }++    torch.save(checkpoint, ckpt_dir / "model_optim_rng.pt")+    (save_path / "latest_checkpointed_iteration.txt").write_text("1\n", encoding="utf-8")+    print(f"Successfully converted HF checkpoint from {load_dir} to MCore at {save_dir}")+++def mcore_to_hf(load_dir: str, save_dir: str, config_dir: str | None = None):+    load_path = Path(load_dir)+    save_path = Path(save_dir)++    config_source = Path(config_dir) if config_dir else load_path+    config_path = config_source / "config.json"+    if config_path.exists():+        with open(config_path, "r", encoding="utf-8") as f:+            config = json.load(f)+    else:+        config = {}++    layer_types = config.get("layer_types", DEFAULT_LAYER_TYPES)+    hidden_size = config.get("hidden_size", 2048)+    num_heads = config.get("num_attention_heads", 32)+    num_kv_heads = config.get("num_key_value_heads", 8)+    head_dim = hidden_size // num_heads+    num_groups = num_kv_heads+    heads_per_group = num_heads // num_groups+    q_group_dim = heads_per_group * head_dim+    kv_group_dim = head_dim+    total_group_dim = q_group_dim + 2 * kv_group_dim+    ffn_size = 8192++    tracker_file = load_path / "latest_checkpointed_iteration.txt"+    iteration = 1+    if tracker_file.exists():+        try:+            iteration = int(tracker_file.read_text(encoding="utf-8").strip())+        except ValueError:+            iteration = 1++    pt_file = load_path / f"iter_{iteration:07d}" / "mp_rank_00" / "model_optim_rng.pt"+    if not pt_file.exists():+        pt_files = list((load_path / f"iter_{iteration:07d}").glob("*/model_optim_rng.pt"))+        if pt_files:+            pt_file = pt_files[0]+        else:+            raise FileNotFoundError(f"Cannot find model_optim_rng.pt under {load_path}")++    loaded = torch.load(pt_file, map_location="cpu", weights_only=False)+    if "model" in loaded:+        mcore_weights = loaded["model"]+    elif "model0" in loaded:+        mcore_weights = loaded["model0"]+    else:+        mcore_weights = loaded++    hf_weights: Dict[str, torch.Tensor] = {}++    if "embedding.word_embeddings.weight" in mcore_weights:+        hf_weights["model.embed_tokens.weight"] = mcore_weights["embedding.word_embeddings.weight"].clone()+    if "decoder.final_layernorm.weight" in mcore_weights:+        hf_weights["model.embedding_norm.weight"] = mcore_weights["decoder.final_layernorm.weight"].clone()++    for idx, ltype in enumerate(layer_types):+        in_ln_key = f"decoder.layers.{idx}.input_layernorm.weight"+        if in_ln_key in mcore_weights:+            hf_weights[f"model.layers.{idx}.operator_norm.weight"] = mcore_weights[in_ln_key].clone()++        pre_mlp_ln_key = f"decoder.layers.{idx}.pre_mlp_layernorm.weight"+        if pre_mlp_ln_key in mcore_weights:+            hf_weights[f"model.layers.{idx}.ffn_norm.weight"] = mcore_weights[pre_mlp_ln_key].clone()++        fc1_key = f"decoder.layers.{idx}.mlp.linear_fc1.weight"+        if fc1_key in mcore_weights:+            fc1 = mcore_weights[fc1_key]+            hf_weights[f"model.layers.{idx}.feed_forward.w1.weight"] = fc1[:ffn_size, :].clone()+            hf_weights[f"model.layers.{idx}.feed_forward.w3.weight"] = fc1[ffn_size:, :].clone()++        fc2_key = f"decoder.layers.{idx}.mlp.linear_fc2.weight"+        if fc2_key in mcore_weights:+            hf_weights[f"model.layers.{idx}.feed_forward.w2.weight"] = mcore_weights[fc2_key].clone()++        if ltype == "full_attention":+            qkv_key = f"decoder.layers.{idx}.self_attention.linear_qkv.weight"+            if qkv_key in mcore_weights:+                qkv = mcore_weights[qkv_key]+                q = torch.empty((num_heads * head_dim, hidden_size), dtype=qkv.dtype)+                k = torch.empty((num_kv_heads * head_dim, hidden_size), dtype=qkv.dtype)+                v = torch.empty((num_kv_heads * head_dim, hidden_size), dtype=qkv.dtype)+                for g in range(num_groups):+                    q[g * q_group_dim : (g + 1) * q_group_dim] = qkv[g * total_group_dim : g * total_group_dim + q_group_dim]+                    k[g * kv_group_dim : (g + 1) * kv_group_dim] = qkv[g * total_group_dim + q_group_dim : g * total_group_dim + q_group_dim + kv_group_dim]+                    v[g * kv_group_dim : (g + 1) * kv_group_dim] = qkv[g * total_group_dim + q_group_dim + kv_group_dim : (g + 1) * total_group_dim]+                hf_weights[f"model.layers.{idx}.self_attn.q_proj.weight"] = q+                hf_weights[f"model.layers.{idx}.self_attn.k_proj.weight"] = k+                hf_weights[f"model.layers.{idx}.self_attn.v_proj.weight"] = v++            proj_key = f"decoder.layers.{idx}.self_attention.linear_proj.weight"+            if proj_key in mcore_weights:+                hf_weights[f"model.layers.{idx}.self_attn.out_proj.weight"] = mcore_weights[proj_key].clone()++            q_ln_key = f"decoder.layers.{idx}.self_attention.q_layernorm.weight"+            if q_ln_key in mcore_weights:+                hf_weights[f"model.layers.{idx}.self_attn.q_layernorm.weight"] = mcore_weights[q_ln_key].clone()++            k_ln_key = f"decoder.layers.{idx}.self_attention.k_layernorm.weight"+            if k_ln_key in mcore_weights:+                hf_weights[f"model.layers.{idx}.self_attn.k_layernorm.weight"] = mcore_weights[k_ln_key].clone()++        elif ltype == "conv":+            in_proj_key = f"decoder.layers.{idx}.self_attention.in_proj.weight"+            if in_proj_key in mcore_weights:+                hf_weights[f"model.layers.{idx}.conv.in_proj.weight"] = mcore_weights[in_proj_key].clone()++            conv_key = f"decoder.layers.{idx}.self_attention.conv.weight"+            if conv_key in mcore_weights:+                hf_weights[f"model.layers.{idx}.conv.conv.weight"] = mcore_weights[conv_key].clone()++            out_proj_key = f"decoder.layers.{idx}.self_attention.out_proj.weight"+            if out_proj_key in mcore_weights:+                hf_weights[f"model.layers.{idx}.conv.out_proj.weight"] = mcore_weights[out_proj_key].clone()++    save_path.mkdir(parents=True, exist_ok=True)+    save_file(hf_weights, save_path / "model.safetensors")++    if config_dir and Path(config_dir).is_dir():+        for filename in os.listdir(config_dir):+            if filename.endswith((".json", ".jinja", ".txt")):+                src_file = Path(config_dir) / filename+                dst_file = save_path / filename+                if src_file.is_file() and not dst_file.exists():+                    shutil.copy2(src_file, dst_file)++    print(f"Successfully converted MCore checkpoint from {load_dir} to HF at {save_dir}")+++def main():+    parser = argparse.ArgumentParser(description="LFM2 Checkpoint Converter")+    subparsers = parser.add_subparsers(dest="subcommand", required=True)++    hf_to_mc = subparsers.add_parser("hf-to-mcore")+    hf_to_mc.add_argument("--load-dir", type=str, required=True, help="Directory containing HF checkpoint")+    hf_to_mc.add_argument("--save-dir", type=str, required=True, help="Directory to save MCore checkpoint")++    mc_to_hf = subparsers.add_parser("mcore-to-hf")+    mc_to_hf.add_argument("--load-dir", type=str, required=True, help="Directory containing MCore checkpoint")+    mc_to_hf.add_argument("--save-dir", type=str, required=True, help="Directory to save HF checkpoint")+    mc_to_hf.add_argument("--config-dir", type=str, default=None, help="Directory containing original HF config files")++    args = parser.parse_args()++    if args.subcommand == "hf-to-mcore":+        hf_to_mcore(args.load_dir, args.save_dir)+    elif args.subcommand == "mcore-to-hf":+        mcore_to_hf(args.load_dir, args.save_dir, args.config_dir)+++if __name__ == "__main__":+    main()diff --git a/mindspeed_llm/tasks/models/spec/lfm2_spec.py b/mindspeed_llm/tasks/models/spec/lfm2_spec.pynew file mode 100755index 0000000000000000000000000000000000000000..7cc50fbcb99ba25f53e35ccf743e4fc9f16e8fc6--- /dev/null+++ b/mindspeed_llm/tasks/models/spec/lfm2_spec.py@@ -0,0 +1,83 @@+# Copyright (c) 2025, HUAWEI CORPORATION.  All rights reserved.+from megatron.core.fusions.fused_bias_dropout import get_bias_dropout_add+from megatron.core.tensor_parallel.layers import ColumnParallelLinear, RowParallelLinear+from megatron.core.transformer.attention import SelfAttention, SelfAttentionSubmodules+from megatron.core.transformer.dot_product_attention import DotProductAttention+from megatron.core.transformer.enums import AttnMaskType+from megatron.core.transformer.identity_op import IdentityOp+from megatron.core.transformer.spec_utils import ModuleSpec+from megatron.core.models.gpt.gpt_layer_specs import _get_mlp_module_spec+from megatron.core.transformer.transformer_block import TransformerBlockSubmodules+from megatron.core.transformer.transformer_layer import TransformerLayer, TransformerLayerSubmodules+from megatron.training import get_args++from mindspeed_llm.core.transformer.custom_layers.transformer_engine import PTNorm+from mindspeed_llm.core.models.lfm2.short_conv import ShortConv, ShortConvSubmodules++LAYER_TYPES = [+    "conv", "conv", "full_attention", "conv",+    "conv", "full_attention", "conv", "conv",+    "full_attention", "conv", "full_attention", "conv",+    "full_attention", "conv", "full_attention", "conv",+]++args = get_args()+num_experts = getattr(args, "num_experts", None)+moe_grouped_gemm = getattr(args, "moe_grouped_gemm", False)+qk_layernorm = getattr(args, "qk_layernorm", False)+use_te = getattr(args, "transformer_impl", "local") == "transformer_engine"++attention_layer_spec = ModuleSpec(+    module=TransformerLayer,+    submodules=TransformerLayerSubmodules(+        input_layernorm=PTNorm,+        self_attention=ModuleSpec(+            module=SelfAttention,+            params={"attn_mask_type": AttnMaskType.causal},+            submodules=SelfAttentionSubmodules(+                linear_qkv=ColumnParallelLinear,+                core_attention=DotProductAttention,+                linear_proj=RowParallelLinear,+                q_layernorm=PTNorm if qk_layernorm else IdentityOp,+                k_layernorm=PTNorm if qk_layernorm else IdentityOp,+            ),+        ),+        self_attn_bda=get_bias_dropout_add,+        pre_mlp_layernorm=PTNorm,+        mlp=_get_mlp_module_spec(+            use_te=use_te, num_experts=num_experts, moe_grouped_gemm=moe_grouped_gemm+        ),+        mlp_bda=get_bias_dropout_add,+    ),+)++conv_layer_spec = ModuleSpec(+    module=TransformerLayer,+    submodules=TransformerLayerSubmodules(+        input_layernorm=PTNorm,+        self_attention=ModuleSpec(+            module=ShortConv,+            params={"conv_kernel": 3},+            submodules=ShortConvSubmodules(+                in_proj=ColumnParallelLinear,+                out_proj=RowParallelLinear,+            ),+        ),+        self_attn_bda=get_bias_dropout_add,+        pre_mlp_layernorm=PTNorm,+        mlp=_get_mlp_module_spec(+            use_te=use_te, num_experts=num_experts, moe_grouped_gemm=moe_grouped_gemm+        ),+        mlp_bda=get_bias_dropout_add,+    ),+)++layer_specs = [+    conv_layer_spec if ltype == "conv" else attention_layer_spec+    for ltype in LAYER_TYPES+]++layer_spec = TransformerBlockSubmodules(+    layer_specs=layer_specs,+    layer_norm=PTNorm,+)