Научный форум dxdy

Математика, Физика, Computer Science, Machine Learning, LaTeX, Механика и Техника, Химия,
Биология и Медицина, Экономика и Финансовая Математика, Гуманитарные науки




На страницу Пред.  1 ... 71, 72, 73, 74, 75  След.
 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Klein, зря Вы ему все строки скормили, я просил до диаметра 10. Да, вроде всё правильно.

Следующая задача. Написать как можно более быстро работающий код, который эти числа считает.

mihaild,
Да, имел в виду что проползает питон. На то он и питон, чтоб проползать :-)

Полностью промпт:

Цитата:
[0, 2] — это близнецы, [0, 4] — кузены, [0, 6] — секс-пары. И так далее. Указанные в таблице числа позволяют посчитать по ним константы, а затем по HL1 посчитать очень точный прогноз для этих кортежей. В самом деле константа и для близнецов и для кузенов ровно одна, причём одна и та же. А вот для секс-пар нужны уже две константы.
Просьба написать числа для следующей строки, где паттерн [0, 12].

Код:
Таблица разрешённых вариантов

Паттерн      З а г р я з н я ю щ и х       п р о с т ы х
             0     1     2     3     4     5     6     7
[0,  ]
    2        1
    4        1
    6        2     2
    8        1     2     1
   10        4     6     2

 Re: Тестирование возможностей генеративных языковых моделей
Yadryara в сообщении #1727525 писал(а):
Это я уже заметил и код на питоне даже пару раз видел, хотя первоначально в ответе его не было. Это видно какой-то технический брак.

В ChatGPT для некоторых задач используется Пиотоновская среда с установленными библиотеками, если речь идет об анализе данных, вычислениях, символической алгебре через SymPy. Верификации.

В Codex устроено иначе. Там уже не обязательно заранее самому выбирать язык программирования, библиотеки и инструменты. Можно просто описать задачу, а Codex предложит подходящий стек: один язык программирования или несколько программных языков для проекта. Нужные библиотеки, инструменты и структуру проекта. С разрешения пользователя он может устанавливать зависимости и настраивать всё необходимое для работы. Весь цикл разработки софта от начала и до конца с дальнейшей поддеркой.
Codex также может использовать параллельных агентов для сложных задач. По желанию можно попросить его работать с Математикой, Мэплом, Lean 4 и другими программами, библиотеками. Например, можно попросить сначала решение, а затем выполнить верификацию в Математике или Lean 4.

Я сейчас пишу в Codex верификатор доказательств для Lean 4. Он создал мне MCP, поднял Linux через WSL2 и установил там нужный софт и библиотики. Также заметно усилили контроль безопасности при работе с кодом: разрешения, sandboxing, проверка изменений, отдельные инструменты для анализа безопасности. Вот писал плагин с чтением информации со скриншота в png. В кодексе мне пишут в этой версии библиотике известная уязвимость, поэтому ставим другую. Другая версия не совместам с тем или другим и так далее. Хочется многое автоматизировать и сделать. Я под впечатлением.

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Klein в сообщении #1727538 писал(а):
Я под впечатлением.

То есть новые возможности ИИ производят на Вас впечатление? Благоприятное?

Как понимаю, код для счёта вариантов для HL1 он уже написал, раз посчитал до диаметра 40. А насколько быстро он работает? Вот для сравнения только сегодня опубликовал время счёта двух программ:

Yadryara в сообщении #1727506 писал(а):
Код:
C:\HL1\Asm\CPAP-210>hl1-vc-time.exe 99 0 60
[572556600e0, 4908898560e0, 19058897448e0, 44275879872e0, 68497116236e0, 74303160400e0, 57941831774e0, 32750959046e0, 13353970000e0, 3859063126e0, 764861984e0, 98561550e0, 7586778e0, 302746e0, 4480e0]
Time: 0.080s

C:\FasmNew>48.exe 99 0 60
[57255e4    49088e5    19058e6    44275e6    68497e6    74303e6    57941e6    32750e6    13353e6    38590e5    76486e4    98561e3    75867e2    30274e1    4480]
Time: 18.211s

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Yadryara
Gemini писал(а):
Для паттерна [0, 12] числа будут следующими:
12 2 6 6 2

Но я удивлюсь, если это правильно. По крайней мере я из Вашего промпта вообще ничего не понял. Какие-то названия для пар конкретных чисел, затем какой-то подсчет каких-то констант, затем какой-то прогноз каких-то кортежей. И в задании слово "паттерн", которое раньше не упоминалось.
И дальше какие-то случайные числа, озаглавленные "загрязняющие простые", при том что выше простые числа не упоминались вообще.
В общем тест для экстрасенсов какой-то.

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Ну как же? В заголовке 1-го первого столбца, как раз и написано "Паттерн":

Yadryara в сообщении #1727522 писал(а):
Код:
Таблица разрешённых вариантов

Паттерн      З а г р я з н я ю щ и х       п р о с т ы х
             0     1     2     3     4     5     6     7
[0,  ]
    2        1
    4        1
    6        2     2
    8        1     2     1
   10        4     6     2
   12        6    14    10     2

Как видим, правильные числа, для паттерна [0, 12]: 6, 14, 10, 2.

Что такое близнецы Вы прекрасно знаете, сравнительно недавно обсуждали.
Вот минимальные кузены: 7, 11.
Минимальная секс-пара: 23, 29.
Минимальный кортеж по паттерну [0, 12], насколько помню: 199, 211.

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Yadryara в сообщении #1727549 писал(а):
Что такое близнецы Вы прекрасно знаете, сравнительно недавно обсуждали
Обычно это называется "простые близнецы". Ну и с моделью в том диалоге это не обсуждалось (и не могло).

В общем я не очень понимаю, какой выдачи Вы ожидали от модели по такому промпту. Я бы ожидал либо случайного набора чисел, либо ответа "о чем вообще речь?". Лучше второе, конечно.

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Да, согласен, если непонятно лучше переспросить, чем уверенным тоном нести чушь.

mihaild в сообщении #1727550 писал(а):
В общем я не очень понимаю, какой выдачи Вы ожидали от модели по такому промпту.

Да ту самую выдачу, которую сделала модель, которую тестировал Klein — верные числа для неизвестных ей строк. То есть самый лучший вариант.

Почему ей было понятно и она не стала переспрашивать?

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Klein
А какой в точности промпт использовали Вы?
Yadryara в сообщении #1727557 писал(а):
Почему ей было понятно и она не стала переспрашивать?
Потому что промпт почти наверняка был другой, т.к. Ваш промпт был опубликован после публикации выдачи.

 Re: Тестирование возможностей генеративных языковых моделей
Yadryara в сообщении #1727541 писал(а):
Klein в сообщении #1727538 писал(а):
Я под впечатлением.

То есть новые возможности ИИ производят на Вас впечатление? Благоприятное?

Как понимаю, код для счёта вариантов для HL1 он уже написал, раз посчитал до диаметра 40. А насколько быстро он работает? Вот для сравнения только сегодня опубликовал время счёта двух программ:

Yadryara в сообщении #1727506 писал(а):
Код:
C:\HL1\Asm\CPAP-210>hl1-vc-time.exe 99 0 60
[572556600e0, 4908898560e0, 19058897448e0, 44275879872e0, 68497116236e0, 74303160400e0, 57941831774e0, 32750959046e0, 13353970000e0, 3859063126e0, 764861984e0, 98561550e0, 7586778e0, 302746e0, 4480e0]
Time: 0.080s

C:\FasmNew>48.exe 99 0 60
[57255e4    49088e5    19058e6    44275e6    68497e6    74303e6    57941e6    32750e6    13353e6    38590e5    76486e4    98561e3    75867e2    30274e1    4480]
Time: 18.211s



./bin/hl1-c 99 0 60
[572556600e0, 4908898560e0, 19058897448e0, 44275879872e0, 68497116236e0, 74303160400e0, 57941831774e0, 32750959046e0, 13353970000e0, 3859063126e0, 764861984e0, 98561550e0, 7586778e0, 302746e0, 4480e0]
Time: 0.005485938s

Могу подарить код в C. Соdex собирал его в линуксоидной среде. Там директория и больше десятка файлов . Могут собрать portable для Windows. Я сегодня в хорошем настроении. )


Update

----

Держите . Executable на MS Windows 11. Архив не будет доступен через 7 дней. : https://limewire.com/d/MXN7d#ZH4HazIBJc
16Kb zip
В файле README
--help работает

.\hl1-c-windows-x86_64.exe 99 0 92

[365062803855750e0, 4497676255887360e0, 25943414144042700e0, 93060625575511296e0, 232545041481394696e0, 429736002403280400e0, 608459037974968772e0, 674776278188887384e0, 594129179154767542e0, 418501104993713916e0, 236525621094613078e0, 107136635186126094e0, 38700384029637332e0, 11048983115220804e0, 2460206249137560e0, 419457931647292e0, 53441623663262e0, 4926173122432e0, 313672520592e0, 12656289426e0, 251085120e0]
Time: 5.864588200s



.\hl1-c-windows-x86_64.exe --help
Usage: ..\hl1-c-windows-x86_64.exe [options] MAXN OFFSET...
..hl1-c-windows-x86_64.exe 99 0 60

Options:
--plain print exact integers without e0
--json print a JSON integer array
--quiet suppress the result row
--repeat N measured internal repetitions
--warmup N untimed warm-up repetitions
--reference exhaustive C oracle (small inputs)
--prime-order ORDER tuned (default) or ascending
--help show this help

MAXN is the maximum contamination layer. OFFSETs form the base
pattern, start with 0, and must be even. Commas are accepted.
The result is stdout; internal compute timing is stderr.

-- добавлено через 44 минуты --

mihaild в сообщении #1727562 писал(а):
Klein
А какой в точности промпт использовали Вы?
Yadryara в сообщении #1727557 писал(а):
Почему ей было понятно и она не стала переспрашивать?
Потому что промпт почти наверняка был другой, т.к. Ваш промпт был опубликован после публикации выдачи.

Я пишу черновой текст, излагаю в нём всё необходимое в нужной последовательности и прошу модель составить промпт, а затем - улучшить его. Если что пропущено или я забыл указать. И только после этого отправляю модели промпт, сгенерированный ею самой.

Вот для предыдущего промпта, что работал со скриншотом в первом посте на предыдущей странице, промпт который я скормил модели был около 420 строк. Нужен?

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Klein в сообщении #1727568 писал(а):
.\hl1-c-windows-x86_64.exe 99 0 92

[365062803855750e0, 4497676255887360e0, 25943414144042700e0, 93060625575511296e0, 232545041481394696e0, 429736002403280400e0, 608459037974968772e0, 674776278188887384e0, 594129179154767542e0, 418501104993713916e0, 236525621094613078e0, 107136635186126094e0, 38700384029637332e0, 11048983115220804e0, 2460206249137560e0, 419457931647292e0, 53441623663262e0, 4926173122432e0, 313672520592e0, 12656289426e0, 251085120e0]
Time: 5.864588200s

Спасибо. Пока проигрывает программе Дмитрия. И много:

Код:
C:\HL1\Asm\CPAP-210>hl1-vc-time.exe 99 0 92
[365062803855750e0, 4497676255887360e0, 25943414144042700e0, 93060625575511296e0, 232545041481394696e0, 429736002403280400e0, 608459037974968772e0, 674776278188887384e0, 594129179154767542e0, 418501104993713916e0, 236525621094613078e0, 107136635186126094e0, 38700384029637332e0, 11048983115220804e0, 2460206249137560e0, 419457931647292e0, 53441623663262e0, 4926173122432e0, 313672520592e0, 12656289426e0, 251085120e0]
Time: 0.751s

Правда, я не знаю на чём Вы запускали.

Присоединяюсь к вопросу mihaild. О чём Вы спрашивали у ИИ ?

-- добавлено через 1 минуту --

Klein в сообщении #1727568 писал(а):
Вот для предыдущего промпта, что работал со скриншотом в первом посте на предыдущей странице, промпт который я скормил модели был около 420 строк. Нужен?

Нужен промпт по моей задаче.

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Klein в сообщении #1727568 писал(а):
Вот для предыдущего промпта, что работал со скриншотом в первом посте на предыдущей странице, промпт который я скормил модели был около 420 строк. Нужен?
Не особо. Нужно подтверждение что действительно модель не способна автомагически угадать, что имелось в виду, по предложенному мне промпту.

 Re: Тестирование возможностей генеративных языковых моделей
Yadryara в сообщении #1727574 писал(а):
Правда, я не знаю на чём Вы запускали.

Присоединяюсь к вопросу mihaild. О чём Вы спрашивали у ИИ ?


К ответу на предыдущей странице - промпт ниже.

ПС
Саму программу (которая работает медленнее) я писать не планировал и даже не разбирался, что именно сделала модель: просто попросил ее написать программу на C. Можно попросить модель оптимизировать код и определить, какие его участки замедляют работу программы.

Prompt . Скриншот вашего сообщения прилагался.

Код: [ скачать ] [ спрятать ]
  1. "You are the lead computational mathematician, algorithm designer, and 
  2. high-performance-computing engineer for this project. 
  3.  
  4. Your task is not merely to recommend a programming language or libraries. 
  5. You must formalise the counting problem, select an appropriate technical 
  6. stack, implement a correct exact counter, verify it independently, optimise 
  7. it, and benchmark it. 
  8.  
  9. PROJECT GOAL 
  10.  
  11. Develop a fast, memory-efficient, reproducible program that exactly counts 
  12. the admissible objects represented by the attached table. The program must 
  13. reproduce all known rows and scale to substantially larger diameters. 
  14.  
  15. Use the attached screenshot as a regression reference: 
  16.  
  17.     @table.png 
  18.  
  19. Read all relevant files already present in the repository, including: 
  20.  
  21.     @AGENTS.md 
  22.     @README.md 
  23.     @problem_statement.md 
  24.     @notes/ 
  25.     @src/ 
  26.     @tests/ 
  27.  
  28. The exact mathematical definition of the objects being counted is: 
  29.  
  30.     [PASTE THE COMPLETE MATHEMATICAL DEFINITION HERE] 
  31.  
  32. The definition must specify, at minimum: 
  33.  
  34. 1. What constitutes an object or admissible variant. 
  35. 2. What “diameter” means. 
  36. 3. What the columns numbered 0, 1, 2, ... represent. 
  37. 4. What the phrase “pattern of contaminating primes” means in this problem. 
  38. 5. Whether objects related by reflection, rotation, translation, relabelling, 
  39.    permutation, or another symmetry are regarded as identical. 
  40. 6. Whether objects are labelled or unlabelled. 
  41. 7. All admissibility restrictions. 
  42. 8. Whether blank table entries mean zero or “not applicable”. 
  43.  
  44. IMPORTANT SPECIFICATION RULE 
  45.  
  46. The screenshot and the numerical table are test data, not a complete 
  47. mathematical specification. Do not infer the definition solely by fitting a 
  48. recurrence or extrapolating the displayed numbers. 
  49.  
  50. First search the repository for the complete definition. If the definition 
  51. cannot be recovered unambiguously, stop before implementing the production 
  52. counter and ask me the smallest possible set of precise mathematical 
  53. questions needed to remove the ambiguity. 
  54.  
  55. KNOWN REGRESSION VALUES 
  56.  
  57. The vectors below reproduce the values visible in the screenshot. Index i 
  58. corresponds to column i: 
  59.  
  60.     diameter 2:  [1] 
  61.     diameter 4:  [1] 
  62.     diameter 6:  [2, 2] 
  63.     diameter 8:  [1, 2, 1] 
  64.     diameter 10: [4, 6, 2] 
  65.     diameter 12: [6, 14, 10, 2] 
  66.     diameter 14: [18, 40, 28, 6] 
  67.     diameter 16: [15, 40, 36, 12, 1] 
  68.     diameter 18: [30, 92, 100, 44, 6] 
  69.     diameter 20: [20, 78, 116, 80, 24, 2] 
  70.     diameter 22: [150, 504, 632, 350, 72] 
  71.     diameter 24: [270, 1088, 1738, 1376, 540, 84] 
  72.     diameter 26: [1620, 6688, 11090, 9378, 4224, 952, 84] 
  73.  
  74. Confirm these values against the attached screenshot and the formal 
  75. definition before treating them as authoritative. 
  76.  
  77. ULTRA-MODE DELEGATION 
  78.  
  79. Use independent subagents where useful. In particular, delegate the following 
  80. workstreams and require them to report their reasoning and evidence separately: 
  81.  
  82. 1. Formal-specification agent 
  83.    - Translate the informal statement into precise mathematical definitions. 
  84.    - Identify the equivalence relation and possible symmetries. 
  85.    - Derive invariants, recurrences, generating functions, or decompositions. 
  86.    - Check whether the published table is internally consistent. 
  87.  
  88. 2. Algorithm-design agent 
  89.    - Develop several exact algorithms. 
  90.    - Consider dynamic programming, transfer matrices, generating functions, 
  91.      canonical augmentation, symmetry reduction, memoisation, branch and 
  92.      bound, meet-in-the-middle methods, SAT/SMT formulations, exact-cover 
  93.      methods, graph-isomorphism tools, and other relevant techniques. 
  94.    - Analyse asymptotic time and memory complexity. 
  95.  
  96. 3. Systems-and-performance agent 
  97.    - Compare practical implementation stacks. 
  98.    - Prototype the most promising alternatives. 
  99.    - Profile CPU time, memory use, allocation behaviour, cache behaviour, 
  100.      parallel scalability, and big-integer costs. 
  101.  
  102. 4. Independent-verification agent 
  103.    - Write a deliberately simple reference implementation. 
  104.    - Derive independent checks, identities, invariants, and test cases. 
  105.    - Perform differential testing against the optimised implementation. 
  106.    - Investigate Mathematica, Maple, SageMath, Lean 4, SAT/SMT, or another 
  107.      independent tool where this materially increases confidence. 
  108.  
  109. The lead agent must reconcile disagreements between the subagents. Do not 
  110. accept agreement produced merely by copying the same implementation or 
  111. algorithm. 
  112.  
  113. PHASE 1 — FORMALISE THE PROBLEM 
  114.  
  115. Before choosing a language: 
  116.  
  117. 1. Write a precise specification in SPEC.md. 
  118. 2. Define exactly what is counted in each table cell. 
  119. 3. State the symmetry or equivalence relation. 
  120. 4. Give at least two small hand-checkable examples. 
  121. 5. Explain why the known rows should have their stated values. 
  122. 6. Identify all assumptions and possible ambiguities. 
  123. 7. Determine whether only even diameters are valid, rather than assuming this 
  124.    from the supplied table. 
  125. 8. Determine whether counts can exceed 64-bit integer range at the intended 
  126.    problem sizes. 
  127.  
  128. Do not begin performance optimisation until the specification is sufficiently 
  129. precise to support independent implementation. 
  130.  
  131. PHASE 2 — DERIVE AND COMPARE ALGORITHMS 
  132.  
  133. Develop at least: 
  134.  
  135. A. A simple exhaustive or brute-force reference algorithm suitable for small 
  136.    diameters. 
  137.  
  138. B. A mathematically improved exact algorithm intended for large diameters. 
  139.  
  140. Where applicable, investigate: 
  141.  
  142. - elimination of equivalent states by canonicalisation; 
  143. - Burnside’s lemma or orbit counting; 
  144. - state compression and bit-packed representations; 
  145. - recurrence relations; 
  146. - dynamic programming over canonical boundary states; 
  147. - transfer-matrix methods; 
  148. - sparse polynomial or generating-function computations; 
  149. - memoisation of isomorphic subproblems; 
  150. - precomputation of compatibility relations; 
  151. - branch ordering and branch-and-bound; 
  152. - meet-in-the-middle decompositions; 
  153. - bitsets and word-level parallelism; 
  154. - incremental generation rather than generate-and-filter; 
  155. - work partitioning across CPU cores; 
  156. - checkpointing and restart support. 
  157.  
  158. For every serious candidate algorithm, report: 
  159.  
  160. - correctness argument; 
  161. - state-space size; 
  162. - expected time complexity; 
  163. - expected memory complexity; 
  164. - parallelisation opportunities; 
  165. - implementation risk; 
  166. - predicted scaling bottleneck. 
  167.  
  168. Do not select an algorithm merely because it is easy to code. 
  169.  
  170. PHASE 3 — SELECT THE TECHNICAL STACK 
  171.  
  172. Decide empirically which languages, libraries, build tools, and supporting 
  173. software are appropriate. 
  174.  
  175. Do not default automatically to Python, C++, Rust, Julia, Mathematica, or any 
  176. other language. Compare realistic candidates based on this specific problem. 
  177.  
  178. Candidate stacks may include, but are not limited to: 
  179.  
  180. - C++23 with Boost.Multiprecision, GMP, FLINT, OpenMP, oneTBB, or specialised 
  181.   graph/combinatorics libraries; 
  182. - Rust with rayon, hashbrown, fixedbitset, num-bigint, rug/GMP, or suitable 
  183.   canonicalisation libraries; 
  184. - Julia with specialised exact-arithmetic and combinatorics packages; 
  185. - Python as a transparent reference implementation, potentially combined with 
  186.   Cython, Numba, pybind11, Rust, or C++ for performance-critical kernels; 
  187. - Mathematica, Maple, or SageMath for symbolic derivation and independent 
  188.   verification; 
  189. - Lean 4 for formalising a key recurrence, invariant, or correctness theorem 
  190.   if the formalisation is practical; 
  191. - SAT/SMT, exact-cover, or graph-isomorphism software if the mathematical 
  192.   structure makes those tools appropriate. 
  193.  
  194. For the final stack decision, provide a decision matrix covering: 
  195.  
  196. - correctness and exact arithmetic; 
  197. - development time; 
  198. - execution speed; 
  199. - memory efficiency; 
  200. - multicore support; 
  201. - availability of arbitrary-precision integers; 
  202. - quality of profiling and debugging tools; 
  203. - portability; 
  204. - reproducibility; 
  205. - maintenance burden. 
  206.  
  207. Prototype and benchmark the most plausible alternatives rather than relying 
  208. only on general assumptions about language speed. 
  209.  
  210. Use exact integer arithmetic. Floating-point approximations must not be used 
  211. for final counts. 
  212.  
  213. If fixed-width integers are used as an optimisation, add checked overflow and 
  214. a safe automatic or configurable transition to arbitrary-precision integers. 
  215.  
  216. Do not use a GPU unless the computation maps naturally to GPU hardware and a 
  217. benchmark demonstrates a real end-to-end advantage. 
  218.  
  219. PHASE 4 — IMPLEMENTATION 
  220.  
  221. Create: 
  222.  
  223. 1. A small, readable reference implementation. 
  224. 2. A production-quality optimised implementation. 
  225. 3. A command-line interface such as: 
  226.  
  227.        counter --diameter 26 
  228.        counter --max-diameter 40 
  229.        counter --threads auto 
  230.        counter --output results.csv 
  231.        counter --checkpoint checkpoints/run01 
  232.        counter --resume checkpoints/run01 
  233.  
  234. 4. Machine-readable output in CSV or JSON. 
  235. 5. Human-readable output matching the table format. 
  236. 6. Deterministic execution by default. 
  237. 7. Progress reporting for long computations. 
  238. 8. Checkpoint and resume support if runs can last more than a few minutes. 
  239. 9. Explicit error handling and validation of command-line arguments. 
  240. 10. Documentation of memory and disk requirements. 
  241.  
  242. Separate the mathematical logic from input/output, parallel orchestration, and 
  243. performance-specific code. 
  244.  
  245. Avoid unnecessary dependencies and avoid modifying unrelated repository files. 
  246.  
  247. PHASE 5 — VERIFICATION 
  248.  
  249. Correctness is more important than speed. 
  250.  
  251. Use several independent layers of verification: 
  252.  
  253. 1. Reproduce every known row from diameter 2 through diameter 26 exactly. 
  254. 2. Compare the optimised implementation with the simple reference 
  255.    implementation on every size for which brute force is feasible. 
  256. 3. Add unit tests for all local rules and transformations. 
  257. 4. Add property-based tests for invariants. 
  258. 5. Test canonicalisation and symmetry handling independently. 
  259. 6. Test single-threaded and multithreaded runs for identical results. 
  260. 7. Test boundary cases and invalid input. 
  261. 8. Run integer-overflow checks. 
  262. 9. Use sanitizers, static analysis, or equivalent language-specific tools. 
  263. 10. Where practical, implement one independent cross-check in a different 
  264.     language or mathematical system. 
  265. 11. If a recurrence is used, provide a mathematical proof or a sufficiently 
  266.     detailed derivation that can be reviewed independently. 
  267. 12. If feasible, formalise the central recurrence or invariant in Lean 4, but 
  268.     do not allow optional formalisation to block completion of the verified 
  269.     executable counter. 
  270.  
  271. A fast program that reproduces the table only because it was fitted to the 
  272. known outputs is unacceptable. 
  273.  
  274. PHASE 6 — PROFILING AND OPTIMISATION 
  275.  
  276. Establish a baseline before optimising. 
  277.  
  278. Measure at least: 
  279.  
  280. - wall-clock time; 
  281. - CPU time; 
  282. - peak resident memory; 
  283. - allocations; 
  284. - number of generated states; 
  285. - number of retained canonical states; 
  286. - memoisation hit rate; 
  287. - time spent in hashing and canonicalisation; 
  288. - scaling from 1 to the available number of CPU cores; 
  289. - big-integer overhead, if applicable. 
  290.  
  291. Use appropriate profilers and benchmark tools for the selected stack. 
  292.  
  293. Optimise measured bottlenecks rather than guessed bottlenecks. 
  294.  
  295. Consider: 
  296.  
  297. - compact state encodings; 
  298. - custom hashes; 
  299. - sorted vectors versus hash tables; 
  300. - structure-of-arrays versus array-of-structures layouts; 
  301. - memory pools or arenas; 
  302. - reducing allocations; 
  303. - avoiding repeated canonicalisation; 
  304. - precomputed transition tables; 
  305. - cache-friendly traversal; 
  306. - batch processing; 
  307. - work stealing; 
  308. - deterministic parallel reduction; 
  309. - serialisation of reusable intermediate data. 
  310.  
  311. Retain the readable reference version even after the production version has 
  312. been optimised. 
  313.  
  314. BENCHMARK REQUIREMENTS 
  315.  
  316. Benchmark the reference and optimised implementations on the current machine. 
  317.  
  318. Report: 
  319.  
  320. 1. Hardware, operating system, compiler/interpreter, and dependency versions. 
  321. 2. Exact build commands and compiler flags. 
  322. 3. Runtime and peak memory for each feasible diameter. 
  323. 4. Speed-up relative to the reference implementation. 
  324. 5. Parallel efficiency for several thread counts. 
  325. 6. The largest diameter completed within approximately: 
  326.    - one minute; 
  327.    - ten minutes; 
  328.    - one hour, 
  329.    where practical. 
  330. 7. A reasoned projection of scaling beyond the measured range. 
  331. 8. Any point at which arbitrary-precision arithmetic becomes necessary. 
  332.  
  333. Do not present extrapolated runtimes as measured results. 
  334.  
  335. DELIVERABLES 
  336.  
  337. Produce the following: 
  338.  
  339. - AGENTS.md 
  340.   Persistent project instructions and verification requirements. 
  341.  
  342. - SPEC.md 
  343.   Formal mathematical definition and assumptions. 
  344.  
  345. - DESIGN.md 
  346.   Candidate algorithms, correctness arguments, complexity analysis, stack 
  347.   comparison, and final technical decision. 
  348.  
  349. - README.md 
  350.   Build, installation, execution, verification, and benchmark instructions. 
  351.  
  352. - src/ 
  353.   Production implementation. 
  354.  
  355. - reference/ 
  356.   Simple independent implementation. 
  357.  
  358. - tests/ 
  359.   Unit, regression, property, and differential tests. 
  360.  
  361. - benchmarks/ 
  362.   Benchmark scripts and raw benchmark results. 
  363.  
  364. - results/ 
  365.   Generated CSV or JSON tables. 
  366.  
  367. - environment or lock files 
  368.   Reproducible dependency versions. 
  369.  
  370. - FINAL_REPORT.md 
  371.   A concise account of: 
  372.   - the selected algorithm; 
  373.   - the selected language and libraries; 
  374.   - why they were selected; 
  375.   - proof or argument for correctness; 
  376.   - verification results; 
  377.   - performance results; 
  378.   - remaining bottlenecks; 
  379.   - recommended next optimisation steps. 
  380.  
  381. PERMISSIONS AND SECURITY 
  382.  
  383. You may: 
  384.  
  385. - inspect all project files; 
  386. - create and modify files inside this repository; 
  387. - compile and run code; 
  388. - create an isolated virtual environment or toolchain; 
  389. - install project-local dependencies; 
  390. - use the available CPU cores for benchmarks. 
  391.  
  392. Ask before: 
  393.  
  394. - making system-wide changes; 
  395. - requesting administrator privileges; 
  396. - changing WSL or host operating-system configuration; 
  397. - installing proprietary software; 
  398. - transmitting project data to an external service; 
  399. - running a benchmark expected to consume very large amounts of memory, 
  400.   storage, or time. 
  401.  
  402. Use official package managers and pinned dependencies. Do not execute 
  403. unreviewed “curl | shell” installation commands. 
  404.  
  405. EXECUTION POLICY 
  406.  
  407. Begin by inspecting the repository and formalising the task. 
  408.  
  409. Do not ask me which programming language to choose: selecting and justifying 
  410. the stack is part of your task. 
  411.  
  412. Do not stop after producing a plan or a list of recommendations. Continue 
  413. through implementation, verification, profiling, and documentation unless a 
  414. missing mathematical definition makes correct implementation impossible. 
  415.  
  416. Ask questions only when they are necessary to prevent an incorrect 
  417. interpretation of the mathematical problem. 
  418.  
  419. At the end, give me: 
  420.  
  421. 1. The exact counts obtained. 
  422. 2. Confirmation of whether every supplied regression value matched. 
  423. 3. The chosen language, libraries, and tools. 
  424. 4. The measured runtime and memory usage. 
  425. 5. The commands required to reproduce the result. 
  426. 6. Any unresolved mathematical or computational uncertainty. 

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Klein
Можете, пожалуйста, большие блоки заворачивать в блок [ syntax lang="text"][/syntax] ? Их можно будет развернуть, но по умолчанию они будут свернуты в несколько строк - сильно проще будет прокручивать страницу.

Но это стандартный агентный план. Меня больше (хотя всё равно не очень сильно) интересовала изначальная постановка задачи.

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Klein
mihaild в сообщении #1727579 писал(а):
Но это стандартный агентный план. Меня больше (хотя всё равно не очень сильно) интересовала изначальная постановка задачи.
Да, мне тоже было бы интересно.
Такая схема с субагентами работает только на уровне интеллекта Ultra?

 Re: Тестирование возможностей генеративных языковых моделей
Аватара пользователя
Mikhail_K в сообщении #1727587 писал(а):
Такая схема с субагентами работает только на уровне интеллекта Ultra?
Нет, это довольно стандартная процедура уже в районе года, наверное. Со временем, естественно, становится лучше.

 [ Сообщений: 1119 ]  На страницу Пред.  1 ... 71, 72, 73, 74, 75  След.


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group