Instructions to use HyperionGrayAI/cybermodels-linux-drivers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HyperionGrayAI/cybermodels-linux-drivers with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-Coder-Next") model = PeftModel.from_pretrained(base_model, "HyperionGrayAI/cybermodels-linux-drivers") - Notebooks
- Google Colab
- Kaggle
Stage Cybermodels v0.1 linux-drivers
Browse files- COPYING +674 -0
- LICENSE-ADAPTER +202 -0
- LICENSE-DATA +395 -0
- NOTICE.md +1 -0
- README.md +35 -0
- TRAINING.md +16 -0
- adapter_config.json +19 -0
- adapter_model.safetensors +3 -0
- ask_transformers.py +46 -0
- build_data.py +84 -0
- clusterfk-team.json +15 -0
- data/eval.jsonl +14 -0
- data/examples.jsonl +50 -0
- data/sources.json +65 -0
- data/specialist.toml +105 -0
- data/train.jsonl +36 -0
- gpuless_provenance.json +25 -0
- grounding.py +21 -0
- references.sqlite +0 -0
- release.json +24 -0
- runtime/flash_revision.py +33 -0
- runtime/reference.py +49 -0
- serve_specialist.py +98 -0
- specialist.json +5 -0
- training/capture.py +160 -0
- training/fit.py +239 -0
- training/flash_revision.py +33 -0
- training/question_scores.json +752 -0
- training/scores.json +67 -0
COPYING
ADDED
|
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
GNU GENERAL PUBLIC LICENSE
|
| 2 |
+
Version 3, 29 June 2007
|
| 3 |
+
|
| 4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
| 5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 6 |
+
of this license document, but changing it is not allowed.
|
| 7 |
+
|
| 8 |
+
Preamble
|
| 9 |
+
|
| 10 |
+
The GNU General Public License is a free, copyleft license for
|
| 11 |
+
software and other kinds of works.
|
| 12 |
+
|
| 13 |
+
The licenses for most software and other practical works are designed
|
| 14 |
+
to take away your freedom to share and change the works. By contrast,
|
| 15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
| 16 |
+
share and change all versions of a program--to make sure it remains free
|
| 17 |
+
software for all its users. We, the Free Software Foundation, use the
|
| 18 |
+
GNU General Public License for most of our software; it applies also to
|
| 19 |
+
any other work released this way by its authors. You can apply it to
|
| 20 |
+
your programs, too.
|
| 21 |
+
|
| 22 |
+
When we speak of free software, we are referring to freedom, not
|
| 23 |
+
price. Our General Public Licenses are designed to make sure that you
|
| 24 |
+
have the freedom to distribute copies of free software (and charge for
|
| 25 |
+
them if you wish), that you receive source code or can get it if you
|
| 26 |
+
want it, that you can change the software or use pieces of it in new
|
| 27 |
+
free programs, and that you know you can do these things.
|
| 28 |
+
|
| 29 |
+
To protect your rights, we need to prevent others from denying you
|
| 30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
| 31 |
+
certain responsibilities if you distribute copies of the software, or if
|
| 32 |
+
you modify it: responsibilities to respect the freedom of others.
|
| 33 |
+
|
| 34 |
+
For example, if you distribute copies of such a program, whether
|
| 35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
| 36 |
+
freedoms that you received. You must make sure that they, too, receive
|
| 37 |
+
or can get the source code. And you must show them these terms so they
|
| 38 |
+
know their rights.
|
| 39 |
+
|
| 40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
| 41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
| 42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
| 43 |
+
|
| 44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
| 45 |
+
that there is no warranty for this free software. For both users' and
|
| 46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
| 47 |
+
changed, so that their problems will not be attributed erroneously to
|
| 48 |
+
authors of previous versions.
|
| 49 |
+
|
| 50 |
+
Some devices are designed to deny users access to install or run
|
| 51 |
+
modified versions of the software inside them, although the manufacturer
|
| 52 |
+
can do so. This is fundamentally incompatible with the aim of
|
| 53 |
+
protecting users' freedom to change the software. The systematic
|
| 54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
| 55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
| 56 |
+
have designed this version of the GPL to prohibit the practice for those
|
| 57 |
+
products. If such problems arise substantially in other domains, we
|
| 58 |
+
stand ready to extend this provision to those domains in future versions
|
| 59 |
+
of the GPL, as needed to protect the freedom of users.
|
| 60 |
+
|
| 61 |
+
Finally, every program is threatened constantly by software patents.
|
| 62 |
+
States should not allow patents to restrict development and use of
|
| 63 |
+
software on general-purpose computers, but in those that do, we wish to
|
| 64 |
+
avoid the special danger that patents applied to a free program could
|
| 65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
| 66 |
+
patents cannot be used to render the program non-free.
|
| 67 |
+
|
| 68 |
+
The precise terms and conditions for copying, distribution and
|
| 69 |
+
modification follow.
|
| 70 |
+
|
| 71 |
+
TERMS AND CONDITIONS
|
| 72 |
+
|
| 73 |
+
0. Definitions.
|
| 74 |
+
|
| 75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
| 76 |
+
|
| 77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
| 78 |
+
works, such as semiconductor masks.
|
| 79 |
+
|
| 80 |
+
"The Program" refers to any copyrightable work licensed under this
|
| 81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
| 82 |
+
"recipients" may be individuals or organizations.
|
| 83 |
+
|
| 84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
| 85 |
+
in a fashion requiring copyright permission, other than the making of an
|
| 86 |
+
exact copy. The resulting work is called a "modified version" of the
|
| 87 |
+
earlier work or a work "based on" the earlier work.
|
| 88 |
+
|
| 89 |
+
A "covered work" means either the unmodified Program or a work based
|
| 90 |
+
on the Program.
|
| 91 |
+
|
| 92 |
+
To "propagate" a work means to do anything with it that, without
|
| 93 |
+
permission, would make you directly or secondarily liable for
|
| 94 |
+
infringement under applicable copyright law, except executing it on a
|
| 95 |
+
computer or modifying a private copy. Propagation includes copying,
|
| 96 |
+
distribution (with or without modification), making available to the
|
| 97 |
+
public, and in some countries other activities as well.
|
| 98 |
+
|
| 99 |
+
To "convey" a work means any kind of propagation that enables other
|
| 100 |
+
parties to make or receive copies. Mere interaction with a user through
|
| 101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
| 102 |
+
|
| 103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
| 104 |
+
to the extent that it includes a convenient and prominently visible
|
| 105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
| 106 |
+
tells the user that there is no warranty for the work (except to the
|
| 107 |
+
extent that warranties are provided), that licensees may convey the
|
| 108 |
+
work under this License, and how to view a copy of this License. If
|
| 109 |
+
the interface presents a list of user commands or options, such as a
|
| 110 |
+
menu, a prominent item in the list meets this criterion.
|
| 111 |
+
|
| 112 |
+
1. Source Code.
|
| 113 |
+
|
| 114 |
+
The "source code" for a work means the preferred form of the work
|
| 115 |
+
for making modifications to it. "Object code" means any non-source
|
| 116 |
+
form of a work.
|
| 117 |
+
|
| 118 |
+
A "Standard Interface" means an interface that either is an official
|
| 119 |
+
standard defined by a recognized standards body, or, in the case of
|
| 120 |
+
interfaces specified for a particular programming language, one that
|
| 121 |
+
is widely used among developers working in that language.
|
| 122 |
+
|
| 123 |
+
The "System Libraries" of an executable work include anything, other
|
| 124 |
+
than the work as a whole, that (a) is included in the normal form of
|
| 125 |
+
packaging a Major Component, but which is not part of that Major
|
| 126 |
+
Component, and (b) serves only to enable use of the work with that
|
| 127 |
+
Major Component, or to implement a Standard Interface for which an
|
| 128 |
+
implementation is available to the public in source code form. A
|
| 129 |
+
"Major Component", in this context, means a major essential component
|
| 130 |
+
(kernel, window system, and so on) of the specific operating system
|
| 131 |
+
(if any) on which the executable work runs, or a compiler used to
|
| 132 |
+
produce the work, or an object code interpreter used to run it.
|
| 133 |
+
|
| 134 |
+
The "Corresponding Source" for a work in object code form means all
|
| 135 |
+
the source code needed to generate, install, and (for an executable
|
| 136 |
+
work) run the object code and to modify the work, including scripts to
|
| 137 |
+
control those activities. However, it does not include the work's
|
| 138 |
+
System Libraries, or general-purpose tools or generally available free
|
| 139 |
+
programs which are used unmodified in performing those activities but
|
| 140 |
+
which are not part of the work. For example, Corresponding Source
|
| 141 |
+
includes interface definition files associated with source files for
|
| 142 |
+
the work, and the source code for shared libraries and dynamically
|
| 143 |
+
linked subprograms that the work is specifically designed to require,
|
| 144 |
+
such as by intimate data communication or control flow between those
|
| 145 |
+
subprograms and other parts of the work.
|
| 146 |
+
|
| 147 |
+
The Corresponding Source need not include anything that users
|
| 148 |
+
can regenerate automatically from other parts of the Corresponding
|
| 149 |
+
Source.
|
| 150 |
+
|
| 151 |
+
The Corresponding Source for a work in source code form is that
|
| 152 |
+
same work.
|
| 153 |
+
|
| 154 |
+
2. Basic Permissions.
|
| 155 |
+
|
| 156 |
+
All rights granted under this License are granted for the term of
|
| 157 |
+
copyright on the Program, and are irrevocable provided the stated
|
| 158 |
+
conditions are met. This License explicitly affirms your unlimited
|
| 159 |
+
permission to run the unmodified Program. The output from running a
|
| 160 |
+
covered work is covered by this License only if the output, given its
|
| 161 |
+
content, constitutes a covered work. This License acknowledges your
|
| 162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
| 163 |
+
|
| 164 |
+
You may make, run and propagate covered works that you do not
|
| 165 |
+
convey, without conditions so long as your license otherwise remains
|
| 166 |
+
in force. You may convey covered works to others for the sole purpose
|
| 167 |
+
of having them make modifications exclusively for you, or provide you
|
| 168 |
+
with facilities for running those works, provided that you comply with
|
| 169 |
+
the terms of this License in conveying all material for which you do
|
| 170 |
+
not control copyright. Those thus making or running the covered works
|
| 171 |
+
for you must do so exclusively on your behalf, under your direction
|
| 172 |
+
and control, on terms that prohibit them from making any copies of
|
| 173 |
+
your copyrighted material outside their relationship with you.
|
| 174 |
+
|
| 175 |
+
Conveying under any other circumstances is permitted solely under
|
| 176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
| 177 |
+
makes it unnecessary.
|
| 178 |
+
|
| 179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
| 180 |
+
|
| 181 |
+
No covered work shall be deemed part of an effective technological
|
| 182 |
+
measure under any applicable law fulfilling obligations under article
|
| 183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
| 184 |
+
similar laws prohibiting or restricting circumvention of such
|
| 185 |
+
measures.
|
| 186 |
+
|
| 187 |
+
When you convey a covered work, you waive any legal power to forbid
|
| 188 |
+
circumvention of technological measures to the extent such circumvention
|
| 189 |
+
is effected by exercising rights under this License with respect to
|
| 190 |
+
the covered work, and you disclaim any intention to limit operation or
|
| 191 |
+
modification of the work as a means of enforcing, against the work's
|
| 192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
| 193 |
+
technological measures.
|
| 194 |
+
|
| 195 |
+
4. Conveying Verbatim Copies.
|
| 196 |
+
|
| 197 |
+
You may convey verbatim copies of the Program's source code as you
|
| 198 |
+
receive it, in any medium, provided that you conspicuously and
|
| 199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
| 200 |
+
keep intact all notices stating that this License and any
|
| 201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
| 202 |
+
keep intact all notices of the absence of any warranty; and give all
|
| 203 |
+
recipients a copy of this License along with the Program.
|
| 204 |
+
|
| 205 |
+
You may charge any price or no price for each copy that you convey,
|
| 206 |
+
and you may offer support or warranty protection for a fee.
|
| 207 |
+
|
| 208 |
+
5. Conveying Modified Source Versions.
|
| 209 |
+
|
| 210 |
+
You may convey a work based on the Program, or the modifications to
|
| 211 |
+
produce it from the Program, in the form of source code under the
|
| 212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
| 213 |
+
|
| 214 |
+
a) The work must carry prominent notices stating that you modified
|
| 215 |
+
it, and giving a relevant date.
|
| 216 |
+
|
| 217 |
+
b) The work must carry prominent notices stating that it is
|
| 218 |
+
released under this License and any conditions added under section
|
| 219 |
+
7. This requirement modifies the requirement in section 4 to
|
| 220 |
+
"keep intact all notices".
|
| 221 |
+
|
| 222 |
+
c) You must license the entire work, as a whole, under this
|
| 223 |
+
License to anyone who comes into possession of a copy. This
|
| 224 |
+
License will therefore apply, along with any applicable section 7
|
| 225 |
+
additional terms, to the whole of the work, and all its parts,
|
| 226 |
+
regardless of how they are packaged. This License gives no
|
| 227 |
+
permission to license the work in any other way, but it does not
|
| 228 |
+
invalidate such permission if you have separately received it.
|
| 229 |
+
|
| 230 |
+
d) If the work has interactive user interfaces, each must display
|
| 231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
| 232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
| 233 |
+
work need not make them do so.
|
| 234 |
+
|
| 235 |
+
A compilation of a covered work with other separate and independent
|
| 236 |
+
works, which are not by their nature extensions of the covered work,
|
| 237 |
+
and which are not combined with it such as to form a larger program,
|
| 238 |
+
in or on a volume of a storage or distribution medium, is called an
|
| 239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
| 240 |
+
used to limit the access or legal rights of the compilation's users
|
| 241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
| 242 |
+
in an aggregate does not cause this License to apply to the other
|
| 243 |
+
parts of the aggregate.
|
| 244 |
+
|
| 245 |
+
6. Conveying Non-Source Forms.
|
| 246 |
+
|
| 247 |
+
You may convey a covered work in object code form under the terms
|
| 248 |
+
of sections 4 and 5, provided that you also convey the
|
| 249 |
+
machine-readable Corresponding Source under the terms of this License,
|
| 250 |
+
in one of these ways:
|
| 251 |
+
|
| 252 |
+
a) Convey the object code in, or embodied in, a physical product
|
| 253 |
+
(including a physical distribution medium), accompanied by the
|
| 254 |
+
Corresponding Source fixed on a durable physical medium
|
| 255 |
+
customarily used for software interchange.
|
| 256 |
+
|
| 257 |
+
b) Convey the object code in, or embodied in, a physical product
|
| 258 |
+
(including a physical distribution medium), accompanied by a
|
| 259 |
+
written offer, valid for at least three years and valid for as
|
| 260 |
+
long as you offer spare parts or customer support for that product
|
| 261 |
+
model, to give anyone who possesses the object code either (1) a
|
| 262 |
+
copy of the Corresponding Source for all the software in the
|
| 263 |
+
product that is covered by this License, on a durable physical
|
| 264 |
+
medium customarily used for software interchange, for a price no
|
| 265 |
+
more than your reasonable cost of physically performing this
|
| 266 |
+
conveying of source, or (2) access to copy the
|
| 267 |
+
Corresponding Source from a network server at no charge.
|
| 268 |
+
|
| 269 |
+
c) Convey individual copies of the object code with a copy of the
|
| 270 |
+
written offer to provide the Corresponding Source. This
|
| 271 |
+
alternative is allowed only occasionally and noncommercially, and
|
| 272 |
+
only if you received the object code with such an offer, in accord
|
| 273 |
+
with subsection 6b.
|
| 274 |
+
|
| 275 |
+
d) Convey the object code by offering access from a designated
|
| 276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
| 277 |
+
Corresponding Source in the same way through the same place at no
|
| 278 |
+
further charge. You need not require recipients to copy the
|
| 279 |
+
Corresponding Source along with the object code. If the place to
|
| 280 |
+
copy the object code is a network server, the Corresponding Source
|
| 281 |
+
may be on a different server (operated by you or a third party)
|
| 282 |
+
that supports equivalent copying facilities, provided you maintain
|
| 283 |
+
clear directions next to the object code saying where to find the
|
| 284 |
+
Corresponding Source. Regardless of what server hosts the
|
| 285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
| 286 |
+
available for as long as needed to satisfy these requirements.
|
| 287 |
+
|
| 288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
| 289 |
+
you inform other peers where the object code and Corresponding
|
| 290 |
+
Source of the work are being offered to the general public at no
|
| 291 |
+
charge under subsection 6d.
|
| 292 |
+
|
| 293 |
+
A separable portion of the object code, whose source code is excluded
|
| 294 |
+
from the Corresponding Source as a System Library, need not be
|
| 295 |
+
included in conveying the object code work.
|
| 296 |
+
|
| 297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
| 298 |
+
tangible personal property which is normally used for personal, family,
|
| 299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
| 300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
| 301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
| 302 |
+
product received by a particular user, "normally used" refers to a
|
| 303 |
+
typical or common use of that class of product, regardless of the status
|
| 304 |
+
of the particular user or of the way in which the particular user
|
| 305 |
+
actually uses, or expects or is expected to use, the product. A product
|
| 306 |
+
is a consumer product regardless of whether the product has substantial
|
| 307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
| 308 |
+
the only significant mode of use of the product.
|
| 309 |
+
|
| 310 |
+
"Installation Information" for a User Product means any methods,
|
| 311 |
+
procedures, authorization keys, or other information required to install
|
| 312 |
+
and execute modified versions of a covered work in that User Product from
|
| 313 |
+
a modified version of its Corresponding Source. The information must
|
| 314 |
+
suffice to ensure that the continued functioning of the modified object
|
| 315 |
+
code is in no case prevented or interfered with solely because
|
| 316 |
+
modification has been made.
|
| 317 |
+
|
| 318 |
+
If you convey an object code work under this section in, or with, or
|
| 319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
| 320 |
+
part of a transaction in which the right of possession and use of the
|
| 321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
| 322 |
+
fixed term (regardless of how the transaction is characterized), the
|
| 323 |
+
Corresponding Source conveyed under this section must be accompanied
|
| 324 |
+
by the Installation Information. But this requirement does not apply
|
| 325 |
+
if neither you nor any third party retains the ability to install
|
| 326 |
+
modified object code on the User Product (for example, the work has
|
| 327 |
+
been installed in ROM).
|
| 328 |
+
|
| 329 |
+
The requirement to provide Installation Information does not include a
|
| 330 |
+
requirement to continue to provide support service, warranty, or updates
|
| 331 |
+
for a work that has been modified or installed by the recipient, or for
|
| 332 |
+
the User Product in which it has been modified or installed. Access to a
|
| 333 |
+
network may be denied when the modification itself materially and
|
| 334 |
+
adversely affects the operation of the network or violates the rules and
|
| 335 |
+
protocols for communication across the network.
|
| 336 |
+
|
| 337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
| 338 |
+
in accord with this section must be in a format that is publicly
|
| 339 |
+
documented (and with an implementation available to the public in
|
| 340 |
+
source code form), and must require no special password or key for
|
| 341 |
+
unpacking, reading or copying.
|
| 342 |
+
|
| 343 |
+
7. Additional Terms.
|
| 344 |
+
|
| 345 |
+
"Additional permissions" are terms that supplement the terms of this
|
| 346 |
+
License by making exceptions from one or more of its conditions.
|
| 347 |
+
Additional permissions that are applicable to the entire Program shall
|
| 348 |
+
be treated as though they were included in this License, to the extent
|
| 349 |
+
that they are valid under applicable law. If additional permissions
|
| 350 |
+
apply only to part of the Program, that part may be used separately
|
| 351 |
+
under those permissions, but the entire Program remains governed by
|
| 352 |
+
this License without regard to the additional permissions.
|
| 353 |
+
|
| 354 |
+
When you convey a copy of a covered work, you may at your option
|
| 355 |
+
remove any additional permissions from that copy, or from any part of
|
| 356 |
+
it. (Additional permissions may be written to require their own
|
| 357 |
+
removal in certain cases when you modify the work.) You may place
|
| 358 |
+
additional permissions on material, added by you to a covered work,
|
| 359 |
+
for which you have or can give appropriate copyright permission.
|
| 360 |
+
|
| 361 |
+
Notwithstanding any other provision of this License, for material you
|
| 362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
| 363 |
+
that material) supplement the terms of this License with terms:
|
| 364 |
+
|
| 365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
| 366 |
+
terms of sections 15 and 16 of this License; or
|
| 367 |
+
|
| 368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
| 369 |
+
author attributions in that material or in the Appropriate Legal
|
| 370 |
+
Notices displayed by works containing it; or
|
| 371 |
+
|
| 372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
| 373 |
+
requiring that modified versions of such material be marked in
|
| 374 |
+
reasonable ways as different from the original version; or
|
| 375 |
+
|
| 376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
| 377 |
+
authors of the material; or
|
| 378 |
+
|
| 379 |
+
e) Declining to grant rights under trademark law for use of some
|
| 380 |
+
trade names, trademarks, or service marks; or
|
| 381 |
+
|
| 382 |
+
f) Requiring indemnification of licensors and authors of that
|
| 383 |
+
material by anyone who conveys the material (or modified versions of
|
| 384 |
+
it) with contractual assumptions of liability to the recipient, for
|
| 385 |
+
any liability that these contractual assumptions directly impose on
|
| 386 |
+
those licensors and authors.
|
| 387 |
+
|
| 388 |
+
All other non-permissive additional terms are considered "further
|
| 389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
| 390 |
+
received it, or any part of it, contains a notice stating that it is
|
| 391 |
+
governed by this License along with a term that is a further
|
| 392 |
+
restriction, you may remove that term. If a license document contains
|
| 393 |
+
a further restriction but permits relicensing or conveying under this
|
| 394 |
+
License, you may add to a covered work material governed by the terms
|
| 395 |
+
of that license document, provided that the further restriction does
|
| 396 |
+
not survive such relicensing or conveying.
|
| 397 |
+
|
| 398 |
+
If you add terms to a covered work in accord with this section, you
|
| 399 |
+
must place, in the relevant source files, a statement of the
|
| 400 |
+
additional terms that apply to those files, or a notice indicating
|
| 401 |
+
where to find the applicable terms.
|
| 402 |
+
|
| 403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
| 404 |
+
form of a separately written license, or stated as exceptions;
|
| 405 |
+
the above requirements apply either way.
|
| 406 |
+
|
| 407 |
+
8. Termination.
|
| 408 |
+
|
| 409 |
+
You may not propagate or modify a covered work except as expressly
|
| 410 |
+
provided under this License. Any attempt otherwise to propagate or
|
| 411 |
+
modify it is void, and will automatically terminate your rights under
|
| 412 |
+
this License (including any patent licenses granted under the third
|
| 413 |
+
paragraph of section 11).
|
| 414 |
+
|
| 415 |
+
However, if you cease all violation of this License, then your
|
| 416 |
+
license from a particular copyright holder is reinstated (a)
|
| 417 |
+
provisionally, unless and until the copyright holder explicitly and
|
| 418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
| 419 |
+
holder fails to notify you of the violation by some reasonable means
|
| 420 |
+
prior to 60 days after the cessation.
|
| 421 |
+
|
| 422 |
+
Moreover, your license from a particular copyright holder is
|
| 423 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 424 |
+
violation by some reasonable means, this is the first time you have
|
| 425 |
+
received notice of violation of this License (for any work) from that
|
| 426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
| 427 |
+
your receipt of the notice.
|
| 428 |
+
|
| 429 |
+
Termination of your rights under this section does not terminate the
|
| 430 |
+
licenses of parties who have received copies or rights from you under
|
| 431 |
+
this License. If your rights have been terminated and not permanently
|
| 432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
| 433 |
+
material under section 10.
|
| 434 |
+
|
| 435 |
+
9. Acceptance Not Required for Having Copies.
|
| 436 |
+
|
| 437 |
+
You are not required to accept this License in order to receive or
|
| 438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
| 439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
| 440 |
+
to receive a copy likewise does not require acceptance. However,
|
| 441 |
+
nothing other than this License grants you permission to propagate or
|
| 442 |
+
modify any covered work. These actions infringe copyright if you do
|
| 443 |
+
not accept this License. Therefore, by modifying or propagating a
|
| 444 |
+
covered work, you indicate your acceptance of this License to do so.
|
| 445 |
+
|
| 446 |
+
10. Automatic Licensing of Downstream Recipients.
|
| 447 |
+
|
| 448 |
+
Each time you convey a covered work, the recipient automatically
|
| 449 |
+
receives a license from the original licensors, to run, modify and
|
| 450 |
+
propagate that work, subject to this License. You are not responsible
|
| 451 |
+
for enforcing compliance by third parties with this License.
|
| 452 |
+
|
| 453 |
+
An "entity transaction" is a transaction transferring control of an
|
| 454 |
+
organization, or substantially all assets of one, or subdividing an
|
| 455 |
+
organization, or merging organizations. If propagation of a covered
|
| 456 |
+
work results from an entity transaction, each party to that
|
| 457 |
+
transaction who receives a copy of the work also receives whatever
|
| 458 |
+
licenses to the work the party's predecessor in interest had or could
|
| 459 |
+
give under the previous paragraph, plus a right to possession of the
|
| 460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
| 461 |
+
the predecessor has it or can get it with reasonable efforts.
|
| 462 |
+
|
| 463 |
+
You may not impose any further restrictions on the exercise of the
|
| 464 |
+
rights granted or affirmed under this License. For example, you may
|
| 465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
| 466 |
+
rights granted under this License, and you may not initiate litigation
|
| 467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
| 468 |
+
any patent claim is infringed by making, using, selling, offering for
|
| 469 |
+
sale, or importing the Program or any portion of it.
|
| 470 |
+
|
| 471 |
+
11. Patents.
|
| 472 |
+
|
| 473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
| 474 |
+
License of the Program or a work on which the Program is based. The
|
| 475 |
+
work thus licensed is called the contributor's "contributor version".
|
| 476 |
+
|
| 477 |
+
A contributor's "essential patent claims" are all patent claims
|
| 478 |
+
owned or controlled by the contributor, whether already acquired or
|
| 479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
| 480 |
+
by this License, of making, using, or selling its contributor version,
|
| 481 |
+
but do not include claims that would be infringed only as a
|
| 482 |
+
consequence of further modification of the contributor version. For
|
| 483 |
+
purposes of this definition, "control" includes the right to grant
|
| 484 |
+
patent sublicenses in a manner consistent with the requirements of
|
| 485 |
+
this License.
|
| 486 |
+
|
| 487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
| 488 |
+
patent license under the contributor's essential patent claims, to
|
| 489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
| 490 |
+
propagate the contents of its contributor version.
|
| 491 |
+
|
| 492 |
+
In the following three paragraphs, a "patent license" is any express
|
| 493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
| 494 |
+
(such as an express permission to practice a patent or covenant not to
|
| 495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
| 496 |
+
party means to make such an agreement or commitment not to enforce a
|
| 497 |
+
patent against the party.
|
| 498 |
+
|
| 499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
| 500 |
+
and the Corresponding Source of the work is not available for anyone
|
| 501 |
+
to copy, free of charge and under the terms of this License, through a
|
| 502 |
+
publicly available network server or other readily accessible means,
|
| 503 |
+
then you must either (1) cause the Corresponding Source to be so
|
| 504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
| 505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
| 506 |
+
consistent with the requirements of this License, to extend the patent
|
| 507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
| 508 |
+
actual knowledge that, but for the patent license, your conveying the
|
| 509 |
+
covered work in a country, or your recipient's use of the covered work
|
| 510 |
+
in a country, would infringe one or more identifiable patents in that
|
| 511 |
+
country that you have reason to believe are valid.
|
| 512 |
+
|
| 513 |
+
If, pursuant to or in connection with a single transaction or
|
| 514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
| 515 |
+
covered work, and grant a patent license to some of the parties
|
| 516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
| 517 |
+
or convey a specific copy of the covered work, then the patent license
|
| 518 |
+
you grant is automatically extended to all recipients of the covered
|
| 519 |
+
work and works based on it.
|
| 520 |
+
|
| 521 |
+
A patent license is "discriminatory" if it does not include within
|
| 522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
| 523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
| 524 |
+
specifically granted under this License. You may not convey a covered
|
| 525 |
+
work if you are a party to an arrangement with a third party that is
|
| 526 |
+
in the business of distributing software, under which you make payment
|
| 527 |
+
to the third party based on the extent of your activity of conveying
|
| 528 |
+
the work, and under which the third party grants, to any of the
|
| 529 |
+
parties who would receive the covered work from you, a discriminatory
|
| 530 |
+
patent license (a) in connection with copies of the covered work
|
| 531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
| 532 |
+
for and in connection with specific products or compilations that
|
| 533 |
+
contain the covered work, unless you entered into that arrangement,
|
| 534 |
+
or that patent license was granted, prior to 28 March 2007.
|
| 535 |
+
|
| 536 |
+
Nothing in this License shall be construed as excluding or limiting
|
| 537 |
+
any implied license or other defenses to infringement that may
|
| 538 |
+
otherwise be available to you under applicable patent law.
|
| 539 |
+
|
| 540 |
+
12. No Surrender of Others' Freedom.
|
| 541 |
+
|
| 542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
| 543 |
+
otherwise) that contradict the conditions of this License, they do not
|
| 544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
| 545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
| 546 |
+
License and any other pertinent obligations, then as a consequence you may
|
| 547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
| 548 |
+
to collect a royalty for further conveying from those to whom you convey
|
| 549 |
+
the Program, the only way you could satisfy both those terms and this
|
| 550 |
+
License would be to refrain entirely from conveying the Program.
|
| 551 |
+
|
| 552 |
+
13. Use with the GNU Affero General Public License.
|
| 553 |
+
|
| 554 |
+
Notwithstanding any other provision of this License, you have
|
| 555 |
+
permission to link or combine any covered work with a work licensed
|
| 556 |
+
under version 3 of the GNU Affero General Public License into a single
|
| 557 |
+
combined work, and to convey the resulting work. The terms of this
|
| 558 |
+
License will continue to apply to the part which is the covered work,
|
| 559 |
+
but the special requirements of the GNU Affero General Public License,
|
| 560 |
+
section 13, concerning interaction through a network will apply to the
|
| 561 |
+
combination as such.
|
| 562 |
+
|
| 563 |
+
14. Revised Versions of this License.
|
| 564 |
+
|
| 565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
| 566 |
+
the GNU General Public License from time to time. Such new versions will
|
| 567 |
+
be similar in spirit to the present version, but may differ in detail to
|
| 568 |
+
address new problems or concerns.
|
| 569 |
+
|
| 570 |
+
Each version is given a distinguishing version number. If the
|
| 571 |
+
Program specifies that a certain numbered version of the GNU General
|
| 572 |
+
Public License "or any later version" applies to it, you have the
|
| 573 |
+
option of following the terms and conditions either of that numbered
|
| 574 |
+
version or of any later version published by the Free Software
|
| 575 |
+
Foundation. If the Program does not specify a version number of the
|
| 576 |
+
GNU General Public License, you may choose any version ever published
|
| 577 |
+
by the Free Software Foundation.
|
| 578 |
+
|
| 579 |
+
If the Program specifies that a proxy can decide which future
|
| 580 |
+
versions of the GNU General Public License can be used, that proxy's
|
| 581 |
+
public statement of acceptance of a version permanently authorizes you
|
| 582 |
+
to choose that version for the Program.
|
| 583 |
+
|
| 584 |
+
Later license versions may give you additional or different
|
| 585 |
+
permissions. However, no additional obligations are imposed on any
|
| 586 |
+
author or copyright holder as a result of your choosing to follow a
|
| 587 |
+
later version.
|
| 588 |
+
|
| 589 |
+
15. Disclaimer of Warranty.
|
| 590 |
+
|
| 591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
| 592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
| 593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
| 594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
| 595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
| 597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
| 598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
| 599 |
+
|
| 600 |
+
16. Limitation of Liability.
|
| 601 |
+
|
| 602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
| 604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
| 605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
| 606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
| 607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
| 608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
| 609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
| 610 |
+
SUCH DAMAGES.
|
| 611 |
+
|
| 612 |
+
17. Interpretation of Sections 15 and 16.
|
| 613 |
+
|
| 614 |
+
If the disclaimer of warranty and limitation of liability provided
|
| 615 |
+
above cannot be given local legal effect according to their terms,
|
| 616 |
+
reviewing courts shall apply local law that most closely approximates
|
| 617 |
+
an absolute waiver of all civil liability in connection with the
|
| 618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
| 619 |
+
copy of the Program in return for a fee.
|
| 620 |
+
|
| 621 |
+
END OF TERMS AND CONDITIONS
|
| 622 |
+
|
| 623 |
+
How to Apply These Terms to Your New Programs
|
| 624 |
+
|
| 625 |
+
If you develop a new program, and you want it to be of the greatest
|
| 626 |
+
possible use to the public, the best way to achieve this is to make it
|
| 627 |
+
free software which everyone can redistribute and change under these terms.
|
| 628 |
+
|
| 629 |
+
To do so, attach the following notices to the program. It is safest
|
| 630 |
+
to attach them to the start of each source file to most effectively
|
| 631 |
+
state the exclusion of warranty; and each file should have at least
|
| 632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
| 633 |
+
|
| 634 |
+
{one line to give the program's name and a brief idea of what it does.}
|
| 635 |
+
Copyright (C) {year} {name of author}
|
| 636 |
+
|
| 637 |
+
This program is free software: you can redistribute it and/or modify
|
| 638 |
+
it under the terms of the GNU General Public License as published by
|
| 639 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 640 |
+
(at your option) any later version.
|
| 641 |
+
|
| 642 |
+
This program is distributed in the hope that it will be useful,
|
| 643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 645 |
+
GNU General Public License for more details.
|
| 646 |
+
|
| 647 |
+
You should have received a copy of the GNU General Public License
|
| 648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 649 |
+
|
| 650 |
+
Also add information on how to contact you by electronic and paper mail.
|
| 651 |
+
|
| 652 |
+
If the program does terminal interaction, make it output a short
|
| 653 |
+
notice like this when it starts in an interactive mode:
|
| 654 |
+
|
| 655 |
+
{project} Copyright (C) {year} {fullname}
|
| 656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 657 |
+
This is free software, and you are welcome to redistribute it
|
| 658 |
+
under certain conditions; type `show c' for details.
|
| 659 |
+
|
| 660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
| 661 |
+
parts of the General Public License. Of course, your program's commands
|
| 662 |
+
might be different; for a GUI interface, you would use an "about box".
|
| 663 |
+
|
| 664 |
+
You should also get your employer (if you work as a programmer) or school,
|
| 665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
| 666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
| 667 |
+
<http://www.gnu.org/licenses/>.
|
| 668 |
+
|
| 669 |
+
The GNU General Public License does not permit incorporating your program
|
| 670 |
+
into proprietary programs. If your program is a subroutine library, you
|
| 671 |
+
may consider it more useful to permit linking proprietary applications with
|
| 672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
| 673 |
+
Public License instead of this License. But first, please read
|
| 674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
LICENSE-ADAPTER
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
LICENSE-DATA
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Attribution 4.0 International
|
| 2 |
+
|
| 3 |
+
=======================================================================
|
| 4 |
+
|
| 5 |
+
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
| 6 |
+
does not provide legal services or legal advice. Distribution of
|
| 7 |
+
Creative Commons public licenses does not create a lawyer-client or
|
| 8 |
+
other relationship. Creative Commons makes its licenses and related
|
| 9 |
+
information available on an "as-is" basis. Creative Commons gives no
|
| 10 |
+
warranties regarding its licenses, any material licensed under their
|
| 11 |
+
terms and conditions, or any related information. Creative Commons
|
| 12 |
+
disclaims all liability for damages resulting from their use to the
|
| 13 |
+
fullest extent possible.
|
| 14 |
+
|
| 15 |
+
Using Creative Commons Public Licenses
|
| 16 |
+
|
| 17 |
+
Creative Commons public licenses provide a standard set of terms and
|
| 18 |
+
conditions that creators and other rights holders may use to share
|
| 19 |
+
original works of authorship and other material subject to copyright
|
| 20 |
+
and certain other rights specified in the public license below. The
|
| 21 |
+
following considerations are for informational purposes only, are not
|
| 22 |
+
exhaustive, and do not form part of our licenses.
|
| 23 |
+
|
| 24 |
+
Considerations for licensors: Our public licenses are
|
| 25 |
+
intended for use by those authorized to give the public
|
| 26 |
+
permission to use material in ways otherwise restricted by
|
| 27 |
+
copyright and certain other rights. Our licenses are
|
| 28 |
+
irrevocable. Licensors should read and understand the terms
|
| 29 |
+
and conditions of the license they choose before applying it.
|
| 30 |
+
Licensors should also secure all rights necessary before
|
| 31 |
+
applying our licenses so that the public can reuse the
|
| 32 |
+
material as expected. Licensors should clearly mark any
|
| 33 |
+
material not subject to the license. This includes other CC-
|
| 34 |
+
licensed material, or material used under an exception or
|
| 35 |
+
limitation to copyright. More considerations for licensors:
|
| 36 |
+
wiki.creativecommons.org/Considerations_for_licensors
|
| 37 |
+
|
| 38 |
+
Considerations for the public: By using one of our public
|
| 39 |
+
licenses, a licensor grants the public permission to use the
|
| 40 |
+
licensed material under specified terms and conditions. If
|
| 41 |
+
the licensor's permission is not necessary for any reason--for
|
| 42 |
+
example, because of any applicable exception or limitation to
|
| 43 |
+
copyright--then that use is not regulated by the license. Our
|
| 44 |
+
licenses grant only permissions under copyright and certain
|
| 45 |
+
other rights that a licensor has authority to grant. Use of
|
| 46 |
+
the licensed material may still be restricted for other
|
| 47 |
+
reasons, including because others have copyright or other
|
| 48 |
+
rights in the material. A licensor may make special requests,
|
| 49 |
+
such as asking that all changes be marked or described.
|
| 50 |
+
Although not required by our licenses, you are encouraged to
|
| 51 |
+
respect those requests where reasonable. More_considerations
|
| 52 |
+
for the public:
|
| 53 |
+
wiki.creativecommons.org/Considerations_for_licensees
|
| 54 |
+
|
| 55 |
+
=======================================================================
|
| 56 |
+
|
| 57 |
+
Creative Commons Attribution 4.0 International Public License
|
| 58 |
+
|
| 59 |
+
By exercising the Licensed Rights (defined below), You accept and agree
|
| 60 |
+
to be bound by the terms and conditions of this Creative Commons
|
| 61 |
+
Attribution 4.0 International Public License ("Public License"). To the
|
| 62 |
+
extent this Public License may be interpreted as a contract, You are
|
| 63 |
+
granted the Licensed Rights in consideration of Your acceptance of
|
| 64 |
+
these terms and conditions, and the Licensor grants You such rights in
|
| 65 |
+
consideration of benefits the Licensor receives from making the
|
| 66 |
+
Licensed Material available under these terms and conditions.
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
Section 1 -- Definitions.
|
| 70 |
+
|
| 71 |
+
a. Adapted Material means material subject to Copyright and Similar
|
| 72 |
+
Rights that is derived from or based upon the Licensed Material
|
| 73 |
+
and in which the Licensed Material is translated, altered,
|
| 74 |
+
arranged, transformed, or otherwise modified in a manner requiring
|
| 75 |
+
permission under the Copyright and Similar Rights held by the
|
| 76 |
+
Licensor. For purposes of this Public License, where the Licensed
|
| 77 |
+
Material is a musical work, performance, or sound recording,
|
| 78 |
+
Adapted Material is always produced where the Licensed Material is
|
| 79 |
+
synched in timed relation with a moving image.
|
| 80 |
+
|
| 81 |
+
b. Adapter's License means the license You apply to Your Copyright
|
| 82 |
+
and Similar Rights in Your contributions to Adapted Material in
|
| 83 |
+
accordance with the terms and conditions of this Public License.
|
| 84 |
+
|
| 85 |
+
c. Copyright and Similar Rights means copyright and/or similar rights
|
| 86 |
+
closely related to copyright including, without limitation,
|
| 87 |
+
performance, broadcast, sound recording, and Sui Generis Database
|
| 88 |
+
Rights, without regard to how the rights are labeled or
|
| 89 |
+
categorized. For purposes of this Public License, the rights
|
| 90 |
+
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
| 91 |
+
Rights.
|
| 92 |
+
|
| 93 |
+
d. Effective Technological Measures means those measures that, in the
|
| 94 |
+
absence of proper authority, may not be circumvented under laws
|
| 95 |
+
fulfilling obligations under Article 11 of the WIPO Copyright
|
| 96 |
+
Treaty adopted on December 20, 1996, and/or similar international
|
| 97 |
+
agreements.
|
| 98 |
+
|
| 99 |
+
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
| 100 |
+
any other exception or limitation to Copyright and Similar Rights
|
| 101 |
+
that applies to Your use of the Licensed Material.
|
| 102 |
+
|
| 103 |
+
f. Licensed Material means the artistic or literary work, database,
|
| 104 |
+
or other material to which the Licensor applied this Public
|
| 105 |
+
License.
|
| 106 |
+
|
| 107 |
+
g. Licensed Rights means the rights granted to You subject to the
|
| 108 |
+
terms and conditions of this Public License, which are limited to
|
| 109 |
+
all Copyright and Similar Rights that apply to Your use of the
|
| 110 |
+
Licensed Material and that the Licensor has authority to license.
|
| 111 |
+
|
| 112 |
+
h. Licensor means the individual(s) or entity(ies) granting rights
|
| 113 |
+
under this Public License.
|
| 114 |
+
|
| 115 |
+
i. Share means to provide material to the public by any means or
|
| 116 |
+
process that requires permission under the Licensed Rights, such
|
| 117 |
+
as reproduction, public display, public performance, distribution,
|
| 118 |
+
dissemination, communication, or importation, and to make material
|
| 119 |
+
available to the public including in ways that members of the
|
| 120 |
+
public may access the material from a place and at a time
|
| 121 |
+
individually chosen by them.
|
| 122 |
+
|
| 123 |
+
j. Sui Generis Database Rights means rights other than copyright
|
| 124 |
+
resulting from Directive 96/9/EC of the European Parliament and of
|
| 125 |
+
the Council of 11 March 1996 on the legal protection of databases,
|
| 126 |
+
as amended and/or succeeded, as well as other essentially
|
| 127 |
+
equivalent rights anywhere in the world.
|
| 128 |
+
|
| 129 |
+
k. You means the individual or entity exercising the Licensed Rights
|
| 130 |
+
under this Public License. Your has a corresponding meaning.
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
Section 2 -- Scope.
|
| 134 |
+
|
| 135 |
+
a. License grant.
|
| 136 |
+
|
| 137 |
+
1. Subject to the terms and conditions of this Public License,
|
| 138 |
+
the Licensor hereby grants You a worldwide, royalty-free,
|
| 139 |
+
non-sublicensable, non-exclusive, irrevocable license to
|
| 140 |
+
exercise the Licensed Rights in the Licensed Material to:
|
| 141 |
+
|
| 142 |
+
a. reproduce and Share the Licensed Material, in whole or
|
| 143 |
+
in part; and
|
| 144 |
+
|
| 145 |
+
b. produce, reproduce, and Share Adapted Material.
|
| 146 |
+
|
| 147 |
+
2. Exceptions and Limitations. For the avoidance of doubt, where
|
| 148 |
+
Exceptions and Limitations apply to Your use, this Public
|
| 149 |
+
License does not apply, and You do not need to comply with
|
| 150 |
+
its terms and conditions.
|
| 151 |
+
|
| 152 |
+
3. Term. The term of this Public License is specified in Section
|
| 153 |
+
6(a).
|
| 154 |
+
|
| 155 |
+
4. Media and formats; technical modifications allowed. The
|
| 156 |
+
Licensor authorizes You to exercise the Licensed Rights in
|
| 157 |
+
all media and formats whether now known or hereafter created,
|
| 158 |
+
and to make technical modifications necessary to do so. The
|
| 159 |
+
Licensor waives and/or agrees not to assert any right or
|
| 160 |
+
authority to forbid You from making technical modifications
|
| 161 |
+
necessary to exercise the Licensed Rights, including
|
| 162 |
+
technical modifications necessary to circumvent Effective
|
| 163 |
+
Technological Measures. For purposes of this Public License,
|
| 164 |
+
simply making modifications authorized by this Section 2(a)
|
| 165 |
+
(4) never produces Adapted Material.
|
| 166 |
+
|
| 167 |
+
5. Downstream recipients.
|
| 168 |
+
|
| 169 |
+
a. Offer from the Licensor -- Licensed Material. Every
|
| 170 |
+
recipient of the Licensed Material automatically
|
| 171 |
+
receives an offer from the Licensor to exercise the
|
| 172 |
+
Licensed Rights under the terms and conditions of this
|
| 173 |
+
Public License.
|
| 174 |
+
|
| 175 |
+
b. No downstream restrictions. You may not offer or impose
|
| 176 |
+
any additional or different terms or conditions on, or
|
| 177 |
+
apply any Effective Technological Measures to, the
|
| 178 |
+
Licensed Material if doing so restricts exercise of the
|
| 179 |
+
Licensed Rights by any recipient of the Licensed
|
| 180 |
+
Material.
|
| 181 |
+
|
| 182 |
+
6. No endorsement. Nothing in this Public License constitutes or
|
| 183 |
+
may be construed as permission to assert or imply that You
|
| 184 |
+
are, or that Your use of the Licensed Material is, connected
|
| 185 |
+
with, or sponsored, endorsed, or granted official status by,
|
| 186 |
+
the Licensor or others designated to receive attribution as
|
| 187 |
+
provided in Section 3(a)(1)(A)(i).
|
| 188 |
+
|
| 189 |
+
b. Other rights.
|
| 190 |
+
|
| 191 |
+
1. Moral rights, such as the right of integrity, are not
|
| 192 |
+
licensed under this Public License, nor are publicity,
|
| 193 |
+
privacy, and/or other similar personality rights; however, to
|
| 194 |
+
the extent possible, the Licensor waives and/or agrees not to
|
| 195 |
+
assert any such rights held by the Licensor to the limited
|
| 196 |
+
extent necessary to allow You to exercise the Licensed
|
| 197 |
+
Rights, but not otherwise.
|
| 198 |
+
|
| 199 |
+
2. Patent and trademark rights are not licensed under this
|
| 200 |
+
Public License.
|
| 201 |
+
|
| 202 |
+
3. To the extent possible, the Licensor waives any right to
|
| 203 |
+
collect royalties from You for the exercise of the Licensed
|
| 204 |
+
Rights, whether directly or through a collecting society
|
| 205 |
+
under any voluntary or waivable statutory or compulsory
|
| 206 |
+
licensing scheme. In all other cases the Licensor expressly
|
| 207 |
+
reserves any right to collect such royalties.
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
Section 3 -- License Conditions.
|
| 211 |
+
|
| 212 |
+
Your exercise of the Licensed Rights is expressly made subject to the
|
| 213 |
+
following conditions.
|
| 214 |
+
|
| 215 |
+
a. Attribution.
|
| 216 |
+
|
| 217 |
+
1. If You Share the Licensed Material (including in modified
|
| 218 |
+
form), You must:
|
| 219 |
+
|
| 220 |
+
a. retain the following if it is supplied by the Licensor
|
| 221 |
+
with the Licensed Material:
|
| 222 |
+
|
| 223 |
+
i. identification of the creator(s) of the Licensed
|
| 224 |
+
Material and any others designated to receive
|
| 225 |
+
attribution, in any reasonable manner requested by
|
| 226 |
+
the Licensor (including by pseudonym if
|
| 227 |
+
designated);
|
| 228 |
+
|
| 229 |
+
ii. a copyright notice;
|
| 230 |
+
|
| 231 |
+
iii. a notice that refers to this Public License;
|
| 232 |
+
|
| 233 |
+
iv. a notice that refers to the disclaimer of
|
| 234 |
+
warranties;
|
| 235 |
+
|
| 236 |
+
v. a URI or hyperlink to the Licensed Material to the
|
| 237 |
+
extent reasonably practicable;
|
| 238 |
+
|
| 239 |
+
b. indicate if You modified the Licensed Material and
|
| 240 |
+
retain an indication of any previous modifications; and
|
| 241 |
+
|
| 242 |
+
c. indicate the Licensed Material is licensed under this
|
| 243 |
+
Public License, and include the text of, or the URI or
|
| 244 |
+
hyperlink to, this Public License.
|
| 245 |
+
|
| 246 |
+
2. You may satisfy the conditions in Section 3(a)(1) in any
|
| 247 |
+
reasonable manner based on the medium, means, and context in
|
| 248 |
+
which You Share the Licensed Material. For example, it may be
|
| 249 |
+
reasonable to satisfy the conditions by providing a URI or
|
| 250 |
+
hyperlink to a resource that includes the required
|
| 251 |
+
information.
|
| 252 |
+
|
| 253 |
+
3. If requested by the Licensor, You must remove any of the
|
| 254 |
+
information required by Section 3(a)(1)(A) to the extent
|
| 255 |
+
reasonably practicable.
|
| 256 |
+
|
| 257 |
+
4. If You Share Adapted Material You produce, the Adapter's
|
| 258 |
+
License You apply must not prevent recipients of the Adapted
|
| 259 |
+
Material from complying with this Public License.
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
Section 4 -- Sui Generis Database Rights.
|
| 263 |
+
|
| 264 |
+
Where the Licensed Rights include Sui Generis Database Rights that
|
| 265 |
+
apply to Your use of the Licensed Material:
|
| 266 |
+
|
| 267 |
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
| 268 |
+
to extract, reuse, reproduce, and Share all or a substantial
|
| 269 |
+
portion of the contents of the database;
|
| 270 |
+
|
| 271 |
+
b. if You include all or a substantial portion of the database
|
| 272 |
+
contents in a database in which You have Sui Generis Database
|
| 273 |
+
Rights, then the database in which You have Sui Generis Database
|
| 274 |
+
Rights (but not its individual contents) is Adapted Material; and
|
| 275 |
+
|
| 276 |
+
c. You must comply with the conditions in Section 3(a) if You Share
|
| 277 |
+
all or a substantial portion of the contents of the database.
|
| 278 |
+
|
| 279 |
+
For the avoidance of doubt, this Section 4 supplements and does not
|
| 280 |
+
replace Your obligations under this Public License where the Licensed
|
| 281 |
+
Rights include other Copyright and Similar Rights.
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
| 285 |
+
|
| 286 |
+
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
| 287 |
+
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
| 288 |
+
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
| 289 |
+
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
| 290 |
+
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
| 291 |
+
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
| 292 |
+
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
| 293 |
+
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
| 294 |
+
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
| 295 |
+
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
| 296 |
+
|
| 297 |
+
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
| 298 |
+
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
| 299 |
+
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
| 300 |
+
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
| 301 |
+
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
| 302 |
+
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
| 303 |
+
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
| 304 |
+
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
| 305 |
+
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
| 306 |
+
|
| 307 |
+
c. The disclaimer of warranties and limitation of liability provided
|
| 308 |
+
above shall be interpreted in a manner that, to the extent
|
| 309 |
+
possible, most closely approximates an absolute disclaimer and
|
| 310 |
+
waiver of all liability.
|
| 311 |
+
|
| 312 |
+
|
| 313 |
+
Section 6 -- Term and Termination.
|
| 314 |
+
|
| 315 |
+
a. This Public License applies for the term of the Copyright and
|
| 316 |
+
Similar Rights licensed here. However, if You fail to comply with
|
| 317 |
+
this Public License, then Your rights under this Public License
|
| 318 |
+
terminate automatically.
|
| 319 |
+
|
| 320 |
+
b. Where Your right to use the Licensed Material has terminated under
|
| 321 |
+
Section 6(a), it reinstates:
|
| 322 |
+
|
| 323 |
+
1. automatically as of the date the violation is cured, provided
|
| 324 |
+
it is cured within 30 days of Your discovery of the
|
| 325 |
+
violation; or
|
| 326 |
+
|
| 327 |
+
2. upon express reinstatement by the Licensor.
|
| 328 |
+
|
| 329 |
+
For the avoidance of doubt, this Section 6(b) does not affect any
|
| 330 |
+
right the Licensor may have to seek remedies for Your violations
|
| 331 |
+
of this Public License.
|
| 332 |
+
|
| 333 |
+
c. For the avoidance of doubt, the Licensor may also offer the
|
| 334 |
+
Licensed Material under separate terms or conditions or stop
|
| 335 |
+
distributing the Licensed Material at any time; however, doing so
|
| 336 |
+
will not terminate this Public License.
|
| 337 |
+
|
| 338 |
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
| 339 |
+
License.
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
Section 7 -- Other Terms and Conditions.
|
| 343 |
+
|
| 344 |
+
a. The Licensor shall not be bound by any additional or different
|
| 345 |
+
terms or conditions communicated by You unless expressly agreed.
|
| 346 |
+
|
| 347 |
+
b. Any arrangements, understandings, or agreements regarding the
|
| 348 |
+
Licensed Material not stated herein are separate from and
|
| 349 |
+
independent of the terms and conditions of this Public License.
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
Section 8 -- Interpretation.
|
| 353 |
+
|
| 354 |
+
a. For the avoidance of doubt, this Public License does not, and
|
| 355 |
+
shall not be interpreted to, reduce, limit, restrict, or impose
|
| 356 |
+
conditions on any use of the Licensed Material that could lawfully
|
| 357 |
+
be made without permission under this Public License.
|
| 358 |
+
|
| 359 |
+
b. To the extent possible, if any provision of this Public License is
|
| 360 |
+
deemed unenforceable, it shall be automatically reformed to the
|
| 361 |
+
minimum extent necessary to make it enforceable. If the provision
|
| 362 |
+
cannot be reformed, it shall be severed from this Public License
|
| 363 |
+
without affecting the enforceability of the remaining terms and
|
| 364 |
+
conditions.
|
| 365 |
+
|
| 366 |
+
c. No term or condition of this Public License will be waived and no
|
| 367 |
+
failure to comply consented to unless expressly agreed to by the
|
| 368 |
+
Licensor.
|
| 369 |
+
|
| 370 |
+
d. Nothing in this Public License constitutes or may be interpreted
|
| 371 |
+
as a limitation upon, or waiver of, any privileges and immunities
|
| 372 |
+
that apply to the Licensor or You, including from the legal
|
| 373 |
+
processes of any jurisdiction or authority.
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
=======================================================================
|
| 377 |
+
|
| 378 |
+
Creative Commons is not a party to its public
|
| 379 |
+
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
| 380 |
+
its public licenses to material it publishes and in those instances
|
| 381 |
+
will be considered the “Licensor.” The text of the Creative Commons
|
| 382 |
+
public licenses is dedicated to the public domain under the CC0 Public
|
| 383 |
+
Domain Dedication. Except for the limited purpose of indicating that
|
| 384 |
+
material is shared under a Creative Commons public license or as
|
| 385 |
+
otherwise permitted by the Creative Commons policies published at
|
| 386 |
+
creativecommons.org/policies, Creative Commons does not authorize the
|
| 387 |
+
use of the trademark "Creative Commons" or any other trademark or logo
|
| 388 |
+
of Creative Commons without its prior written consent including,
|
| 389 |
+
without limitation, in connection with any unauthorized modifications
|
| 390 |
+
to any of its public licenses or any other arrangements,
|
| 391 |
+
understandings, or agreements concerning use of licensed material. For
|
| 392 |
+
the avoidance of doubt, this paragraph does not form part of the
|
| 393 |
+
public licenses.
|
| 394 |
+
|
| 395 |
+
Creative Commons may be contacted at creativecommons.org.
|
NOTICE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Hyperion Gray releases the adapter under Apache-2.0 (LICENSE-ADAPTER), its original editorial summaries and examples under CC BY 4.0 (LICENSE-DATA), and the included software under GPLv3 (COPYING). The Qwen team supplies the separately downloaded Apache-2.0 base. Each note is an original paraphrase. The external source owners retain their rights in the linked documentation. See data/sources.json for attribution and exact source revisions.
|
README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
base_model: Qwen/Qwen3-Coder-Next
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- lora
|
| 10 |
+
- retrieval-augmented-generation
|
| 11 |
+
- security
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Hyperion Gray Cybermodels · Linux driver maintenance
|
| 15 |
+
|
| 16 |
+
Driver resource lifetime, DMA ownership, device binding and power management in Linux 6.12. This v0.1 specialist pairs a trained Qwennifer Flash adapter with an offline SQLite reference index. Its ClusterFK model ID is `cybermodels-linux-drivers`. Select it in Solo or Collaborate, or use the three-seat definition in `clusterfk-team.json`. [Open ClusterFK](https://clusterfk.hgws.sh)
|
| 17 |
+
|
| 18 |
+
## Run the download
|
| 19 |
+
|
| 20 |
+
Download the repository, install PyTorch, Transformers with Qwen3Next support, Accelerate, PEFT and safetensors, then run `python ask_transformers.py 'Your question'`. The script retrieves relevant editorial notes and loads the adapter on the pinned BF16 base using six experts per token. Supply enough device or host memory for the full base checkpoint. The hosted worker uses packed MXFP4 experts and a bounded cache. The scores below apply to the packed runtime.
|
| 21 |
+
|
| 22 |
+
## Data and evaluation
|
| 23 |
+
|
| 24 |
+
There are 18 training questions and 7 held-out questions. Each appears once with the question alone and once with retrieval. The split holds out entire references. Training runs retrieval against training sources only. A retrieved answer cites its source when available and calls out missing evidence when retrieval misses. All prompts and targets actually used are in `data/train.jsonl` and `data/eval.jsonl`.
|
| 25 |
+
|
| 26 |
+
The index returned the relevant source among its first two results on 6 of 7 held-out questions. The dataset records the source ID of each hit. Questions and notes were authored together, so this is a small in-distribution retrieval check.
|
| 27 |
+
|
| 28 |
+
| Held-out condition | Answer tokens | Base top-1 | Adapter top-1 | Base loss | Adapter loss |
|
| 29 |
+
| --- | ---: | ---: | ---: | ---: | ---: |
|
| 30 |
+
| Question only | 107 | 39.25% | 41.12% | 3.918 | 3.863 |
|
| 31 |
+
| Question with retrieval | 267 | 65.92% | 65.92% | 2.405 | 2.336 |
|
| 32 |
+
|
| 33 |
+
Top-1 is teacher-forced next-token accuracy. Loss is average negative log likelihood. Retrieval targets include citation text. These scores leave broader answer accuracy, citation quality and performance on unrelated domains open. Consult the linked source for version-specific behavior or exact wording.
|
| 34 |
+
|
| 35 |
+
The adapter, training examples, reference notes, source pins and recipes are included in this repository. See `TRAINING.md` and `NOTICE.md` for reproduction and attribution. [Team data and room profile](https://huggingface.co/datasets/HyperionGrayAI/cybermodels-team)
|
TRAINING.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Reproducing this specialist
|
| 2 |
+
|
| 3 |
+
Use Python 3.11+ with SQLite FTS5 to run `python build_data.py`. It rebuilds the local index and exact train and eval files from `data/specialist.toml`. The pinned reference URLs and source-content hashes in `data/sources.json` document the technical basis of the original notes. Retrieval during training searches only training references. The served index also contains the held-out references.
|
| 4 |
+
|
| 5 |
+
The GPUless v0.1 recipe uses the same packed Qwennifer Flash capture and native CPU optimizer as the Windows specialist. Set `inputs`, `flat_cache`, and `hot_experts_file` in a JSON settings file for the matching Belikewater Flash runtime. This run used `map_flat_cache: true`, `capture_cache_slots: 3072`, and one RTX 5090. The frozen Flash runner captures all reference-answer positions in one prefill per example.
|
| 6 |
+
|
| 7 |
+
```sh
|
| 8 |
+
python training/capture.py settings.json data/examples.jsonl features
|
| 9 |
+
export PYTHONPATH="$GPULESS_ROOT/src:$GPULESS_ROOT/labs/knowledge_strategies"
|
| 10 |
+
export GPULESS_NATIVE_LIB="$GPULESS_ROOT/build/lib/libgpuless.so"
|
| 11 |
+
export GPULESS_PTPU_LIB="$GPULESS_ROOT/build/lib/libptpu_lora.so"
|
| 12 |
+
OPENBLAS_NUM_THREADS=2 OMP_NUM_THREADS=2 MKL_NUM_THREADS=2 CUDA_VISIBLE_DEVICES="" \
|
| 13 |
+
"$GPULESS_ROOT/venv/bin/python" training/fit.py features data/examples.jsonl fit
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
The native rank-four optimizer changes the output head in 24 training-derived directions and up to 256 training-derived vocabulary rows. PEFT export expands the result into ordinary tensors. The portable config pins the public upstream base revision. The packed-coordinate identity is recorded separately in `release.json` and GPUless provenance.
|
adapter_config.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"peft_type": "LORA",
|
| 3 |
+
"task_type": "CAUSAL_LM",
|
| 4 |
+
"inference_mode": true,
|
| 5 |
+
"base_model_name_or_path": "Qwen/Qwen3-Coder-Next",
|
| 6 |
+
"revision": "a7fbcb5c0e12d62a448eaa0e260346bf5dcc0feb",
|
| 7 |
+
"r": 4,
|
| 8 |
+
"lora_alpha": 4.0,
|
| 9 |
+
"lora_dropout": 0.0,
|
| 10 |
+
"bias": "none",
|
| 11 |
+
"fan_in_fan_out": false,
|
| 12 |
+
"use_rslora": false,
|
| 13 |
+
"use_dora": false,
|
| 14 |
+
"target_modules": [
|
| 15 |
+
"lm_head"
|
| 16 |
+
],
|
| 17 |
+
"rank_pattern": {},
|
| 18 |
+
"alpha_pattern": {}
|
| 19 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:afccb1ccb2cc9c40b0a4e727ea877db8b96f24df55eca8f2445aa3187c1c6c8d
|
| 3 |
+
size 2463992
|
ask_transformers.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Ask the specialist a question using the public Transformers base and local reference index."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import json
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
import torch
|
| 8 |
+
from grounding import ground
|
| 9 |
+
from peft import PeftModel
|
| 10 |
+
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
@torch.inference_mode()
|
| 14 |
+
def ask(root, question, maximum):
|
| 15 |
+
release = json.loads((root / "release.json").read_text())
|
| 16 |
+
specialist = json.loads((root / "specialist.json").read_text())
|
| 17 |
+
base, revision = release["base"], release["upstream_revision"]
|
| 18 |
+
config = AutoConfig.from_pretrained(base, revision=revision)
|
| 19 |
+
config.num_experts_per_tok = release["experts_per_token"]
|
| 20 |
+
tokenizer = AutoTokenizer.from_pretrained(base, revision=revision)
|
| 21 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 22 |
+
base, config=config, revision=revision, dtype=torch.bfloat16, device_map="auto"
|
| 23 |
+
)
|
| 24 |
+
model = PeftModel.from_pretrained(model, str(root)).eval()
|
| 25 |
+
grounded = ground(root / "references.sqlite", specialist, question)
|
| 26 |
+
prompt = tokenizer.apply_chat_template(
|
| 27 |
+
[{"role": "user", "content": grounded}],
|
| 28 |
+
tokenize=False,
|
| 29 |
+
add_generation_prompt=True,
|
| 30 |
+
)
|
| 31 |
+
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(
|
| 32 |
+
model.get_input_embeddings().weight.device
|
| 33 |
+
)
|
| 34 |
+
ids = model.generate(**inputs, max_new_tokens=maximum, do_sample=False)
|
| 35 |
+
return tokenizer.decode(
|
| 36 |
+
ids[0, inputs.input_ids.shape[1] :], skip_special_tokens=True
|
| 37 |
+
)
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
if __name__ == "__main__":
|
| 41 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 42 |
+
parser.add_argument("question")
|
| 43 |
+
parser.add_argument("--root", type=Path, default=Path(__file__).resolve().parent)
|
| 44 |
+
parser.add_argument("--max-tokens", type=int, default=160)
|
| 45 |
+
args = parser.parse_args()
|
| 46 |
+
print(ask(args.root, args.question, args.max_tokens))
|
build_data.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Rebuild one specialist's exact examples and offline FTS index from its source file."""
|
| 2 |
+
|
| 3 |
+
import hashlib
|
| 4 |
+
import json
|
| 5 |
+
import sqlite3
|
| 6 |
+
import tempfile
|
| 7 |
+
import tomllib
|
| 8 |
+
from contextlib import closing
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
|
| 11 |
+
from grounding import prompt
|
| 12 |
+
from runtime.reference import retrieve
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def index(path, cards):
|
| 16 |
+
with closing(sqlite3.connect(path)) as db, db:
|
| 17 |
+
db.execute(
|
| 18 |
+
"CREATE VIRTUAL TABLE passages USING fts5(title,body,url UNINDEXED,source UNINDEXED,tokenize='porter unicode61')"
|
| 19 |
+
)
|
| 20 |
+
db.executemany(
|
| 21 |
+
"INSERT INTO passages VALUES(?,?,?,?)",
|
| 22 |
+
((c["title"], c["notes"], c["url"], c["id"]) for c in cards),
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def build(root):
|
| 27 |
+
data = root / "data"
|
| 28 |
+
config = tomllib.loads((data / "specialist.toml").read_text())
|
| 29 |
+
cards = config["source"]
|
| 30 |
+
for card in cards:
|
| 31 |
+
card["url"] = config["source_root"] + card["path"]
|
| 32 |
+
with tempfile.TemporaryDirectory(dir=root) as temp:
|
| 33 |
+
temp = Path(temp)
|
| 34 |
+
index(temp / "references.sqlite", cards)
|
| 35 |
+
index(
|
| 36 |
+
temp / "training.sqlite",
|
| 37 |
+
[c for c in cards if c.get("split", "train") == "train"],
|
| 38 |
+
)
|
| 39 |
+
records = []
|
| 40 |
+
for card in cards:
|
| 41 |
+
split = card.get("split", "train")
|
| 42 |
+
db = temp / ("training.sqlite" if split == "train" else "references.sqlite")
|
| 43 |
+
for question, answer in card["qa"]:
|
| 44 |
+
key = hashlib.sha256(question.encode()).hexdigest()[:16]
|
| 45 |
+
for condition in ("closed", "rag"):
|
| 46 |
+
hits = retrieve(db, question) if condition == "rag" else []
|
| 47 |
+
target = answer
|
| 48 |
+
if condition == "rag":
|
| 49 |
+
if any(h["id"] == card["id"] for h in hits):
|
| 50 |
+
target += f" [{card['title']}]({card['url']})"
|
| 51 |
+
else:
|
| 52 |
+
target = (
|
| 53 |
+
"The retrieved references do not establish that. I need a source on "
|
| 54 |
+
+ card["title"]
|
| 55 |
+
+ "."
|
| 56 |
+
)
|
| 57 |
+
records.append(
|
| 58 |
+
dict(
|
| 59 |
+
id=key,
|
| 60 |
+
passage=card["id"],
|
| 61 |
+
condition=condition,
|
| 62 |
+
split=split,
|
| 63 |
+
question=question,
|
| 64 |
+
answer=target,
|
| 65 |
+
retrieved=[h["id"] for h in hits],
|
| 66 |
+
prompt=prompt(config, question, hits)
|
| 67 |
+
if condition == "rag"
|
| 68 |
+
else f"Answer the {config['topic']} question concisely.\nQuestion: {question}",
|
| 69 |
+
)
|
| 70 |
+
)
|
| 71 |
+
for name, subset in (
|
| 72 |
+
("examples", records),
|
| 73 |
+
("train", [r for r in records if r["split"] == "train"]),
|
| 74 |
+
("eval", [r for r in records if r["split"] == "test"]),
|
| 75 |
+
):
|
| 76 |
+
(data / (name + ".jsonl")).write_text(
|
| 77 |
+
"".join(json.dumps(r, ensure_ascii=False) + "\n" for r in subset)
|
| 78 |
+
)
|
| 79 |
+
(temp / "references.sqlite").replace(root / "references.sqlite")
|
| 80 |
+
return records
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
if __name__ == "__main__":
|
| 84 |
+
build(Path(__file__).resolve().parent)
|
clusterfk-team.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "Hyperion Gray Cybermodels",
|
| 3 |
+
"description": "Three source-grounded specialists for Windows internals, Linux driver maintenance and browser-facing web application defense.",
|
| 4 |
+
"mode": "collaborate",
|
| 5 |
+
"pipeline": "standard",
|
| 6 |
+
"rounds": 1,
|
| 7 |
+
"memory": "none",
|
| 8 |
+
"actor_model": "cybermodels-windows",
|
| 9 |
+
"system_prompt": "For team questions, match each part to the relevant specialist. In synthesis, preserve evidence links, distinguish documentation from observations, and call out open questions. Paraphrase editorial notes in your own words.",
|
| 10 |
+
"participants": [
|
| 11 |
+
{"name":"Windows internals","model":"cybermodels-windows","role":"Windows internals","instructions":"Cover Windows process, thread, memory, synchronization and I/O behavior. Cite applicable Microsoft Learn references. Hand other domains to their specialists."},
|
| 12 |
+
{"name":"Linux driver maintenance","model":"cybermodels-linux-drivers","role":"Linux driver maintenance","instructions":"Cover driver lifecycle, reference ownership, synchronization and power management. Cite the applicable Linux kernel documentation."},
|
| 13 |
+
{"name":"Web application defense","model":"cybermodels-web-defense","role":"Web application defense","instructions":"Cover browser policies, cache handling, session-cookie configuration and defensive HTTP behavior. Cite the applicable reference."}
|
| 14 |
+
]
|
| 15 |
+
}
|
data/eval.jsonl
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id": "439fc846eae2caf1", "passage": "kref", "condition": "closed", "split": "test", "question": "Should I take the kref before or after handing a pointer to a worker thread?", "answer": "Take a reference before the handoff so the object stays alive for the worker.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Should I take the kref before or after handing a pointer to a worker thread?"}
|
| 2 |
+
{"id": "439fc846eae2caf1", "passage": "kref", "condition": "rag", "split": "test", "question": "Should I take the kref before or after handing a pointer to a worker thread?", "answer": "Take a reference before the handoff so the object stays alive for the worker. [Object lifetime with kref references](https://docs.kernel.org/6.12/core-api/kref.html)", "retrieved": ["kref", "workqueue"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nObject lifetime with kref references\nFurther reading: https://docs.kernel.org/6.12/core-api/kref.html\nEditorial summary: A kref tracks object lifetime. Take a reference before handing an object to another thread, and drop the reference when that owner finishes. The last put calls the release function. Acquiring a reference through a lookup that has no existing valid reference requires serialization against final release.\n\nWorkqueue ordering and parallel execution\nFurther reading: https://docs.kernel.org/6.12/core-api/workqueue.html\nEditorial summary: Queued work items execute in worker context. When strict execution order is required, an ordered workqueue processes one item at a time in queue order. A general workqueue can have multiple workers. Choosing a bound or unbound workqueue determines how work execution relates to CPU affinity.\n\nQuestion: Should I take the kref before or after handing a pointer to a worker thread?"}
|
| 3 |
+
{"id": "85f79342c40b5e9a", "passage": "kref", "condition": "closed", "split": "test", "question": "When does kref_put invoke the release callback?", "answer": "When dropping that reference brings the count to zero.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: When does kref_put invoke the release callback?"}
|
| 4 |
+
{"id": "85f79342c40b5e9a", "passage": "kref", "condition": "rag", "split": "test", "question": "When does kref_put invoke the release callback?", "answer": "The retrieved references do not establish that. I need a source on Object lifetime with kref references.", "retrieved": ["sysfs", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: When does kref_put invoke the release callback?"}
|
| 5 |
+
{"id": "f9d70efd32d688b8", "passage": "kref", "condition": "closed", "split": "test", "question": "Can an unprotected table lookup race with the last kref_put?", "answer": "Yes. Serialize acquisition from that lookup with final release or use an appropriate lifetime protection scheme.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Can an unprotected table lookup race with the last kref_put?"}
|
| 6 |
+
{"id": "f9d70efd32d688b8", "passage": "kref", "condition": "rag", "split": "test", "question": "Can an unprotected table lookup race with the last kref_put?", "answer": "Yes. Serialize acquisition from that lookup with final release or use an appropriate lifetime protection scheme. [Object lifetime with kref references](https://docs.kernel.org/6.12/core-api/kref.html)", "retrieved": ["kref", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nObject lifetime with kref references\nFurther reading: https://docs.kernel.org/6.12/core-api/kref.html\nEditorial summary: A kref tracks object lifetime. Take a reference before handing an object to another thread, and drop the reference when that owner finishes. The last put calls the release function. Acquiring a reference through a lookup that has no existing valid reference requires serialization against final release.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Can an unprotected table lookup race with the last kref_put?"}
|
| 7 |
+
{"id": "ae6933352e3fdf1c", "passage": "workqueue", "condition": "closed", "split": "test", "question": "Two queued work items must execute strictly in submission order. Which workqueue fits?", "answer": "Use an ordered workqueue so it runs one item at a time in queue order.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Two queued work items must execute strictly in submission order. Which workqueue fits?"}
|
| 8 |
+
{"id": "ae6933352e3fdf1c", "passage": "workqueue", "condition": "rag", "split": "test", "question": "Two queued work items must execute strictly in submission order. Which workqueue fits?", "answer": "Use an ordered workqueue so it runs one item at a time in queue order. [Workqueue ordering and parallel execution](https://docs.kernel.org/6.12/core-api/workqueue.html)", "retrieved": ["workqueue", "device-links"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nWorkqueue ordering and parallel execution\nFurther reading: https://docs.kernel.org/6.12/core-api/workqueue.html\nEditorial summary: Queued work items execute in worker context. When strict execution order is required, an ordered workqueue processes one item at a time in queue order. A general workqueue can have multiple workers. Choosing a bound or unbound workqueue determines how work execution relates to CPU affinity.\n\nDevice links between a consumer and a supplier\nFurther reading: https://docs.kernel.org/6.12/driver-api/device_link.html\nEditorial summary: A device link describes a consumer's dependency on a supplier. Managed links can enforce driver binding and power-management ordering. A consumer should be suspended before its supplier, and the supplier resumed before the consumer. Flags and link type determine which relationships the core enforces.\n\nQuestion: Two queued work items must execute strictly in submission order. Which workqueue fits?"}
|
| 9 |
+
{"id": "1798bd7a085d8722", "passage": "workqueue", "condition": "closed", "split": "test", "question": "Will two unrelated work items on a general workqueue always run serially?", "answer": "No. General workqueues can execute multiple items concurrently.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Will two unrelated work items on a general workqueue always run serially?"}
|
| 10 |
+
{"id": "1798bd7a085d8722", "passage": "workqueue", "condition": "rag", "split": "test", "question": "Will two unrelated work items on a general workqueue always run serially?", "answer": "No. General workqueues can execute multiple items concurrently. [Workqueue ordering and parallel execution](https://docs.kernel.org/6.12/core-api/workqueue.html)", "retrieved": ["workqueue", "kref"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nWorkqueue ordering and parallel execution\nFurther reading: https://docs.kernel.org/6.12/core-api/workqueue.html\nEditorial summary: Queued work items execute in worker context. When strict execution order is required, an ordered workqueue processes one item at a time in queue order. A general workqueue can have multiple workers. Choosing a bound or unbound workqueue determines how work execution relates to CPU affinity.\n\nObject lifetime with kref references\nFurther reading: https://docs.kernel.org/6.12/core-api/kref.html\nEditorial summary: A kref tracks object lifetime. Take a reference before handing an object to another thread, and drop the reference when that owner finishes. The last put calls the release function. Acquiring a reference through a lookup that has no existing valid reference requires serialization against final release.\n\nQuestion: Will two unrelated work items on a general workqueue always run serially?"}
|
| 11 |
+
{"id": "f32d82eb1157a625", "passage": "device-links", "condition": "closed", "split": "test", "question": "For a device link, which resumes first: a consumer or its supplier?", "answer": "Resume the supplier before the dependent consumer.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: For a device link, which resumes first: a consumer or its supplier?"}
|
| 12 |
+
{"id": "f32d82eb1157a625", "passage": "device-links", "condition": "rag", "split": "test", "question": "For a device link, which resumes first: a consumer or its supplier?", "answer": "Resume the supplier before the dependent consumer. [Device links between a consumer and a supplier](https://docs.kernel.org/6.12/driver-api/device_link.html)", "retrieved": ["device-links", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDevice links between a consumer and a supplier\nFurther reading: https://docs.kernel.org/6.12/driver-api/device_link.html\nEditorial summary: A device link describes a consumer's dependency on a supplier. Managed links can enforce driver binding and power-management ordering. A consumer should be suspended before its supplier, and the supplier resumed before the consumer. Flags and link type determine which relationships the core enforces.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: For a device link, which resumes first: a consumer or its supplier?"}
|
| 13 |
+
{"id": "e6ea86b753a2fe78", "passage": "device-links", "condition": "closed", "split": "test", "question": "Why would a driver describe a dependency by adding a device link?", "answer": "It gives the driver core an explicit consumer-supplier relationship for the applicable binding and power-management ordering.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Why would a driver describe a dependency by adding a device link?"}
|
| 14 |
+
{"id": "e6ea86b753a2fe78", "passage": "device-links", "condition": "rag", "split": "test", "question": "Why would a driver describe a dependency by adding a device link?", "answer": "It gives the driver core an explicit consumer-supplier relationship for the applicable binding and power-management ordering. [Device links between a consumer and a supplier](https://docs.kernel.org/6.12/driver-api/device_link.html)", "retrieved": ["device-links", "sysfs"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDevice links between a consumer and a supplier\nFurther reading: https://docs.kernel.org/6.12/driver-api/device_link.html\nEditorial summary: A device link describes a consumer's dependency on a supplier. Managed links can enforce driver binding and power-management ordering. A consumer should be suspended before its supplier, and the supplier resumed before the consumer. Flags and link type determine which relationships the core enforces.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nQuestion: Why would a driver describe a dependency by adding a device link?"}
|
data/examples.jsonl
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id": "e46bf54e6efef4fe", "passage": "devres", "condition": "closed", "split": "train", "question": "Why use a managed device allocation during probe?", "answer": "Its lifetime is tied to the device binding. The driver core releases it on failed probe or detach.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Why use a managed device allocation during probe?"}
|
| 2 |
+
{"id": "e46bf54e6efef4fe", "passage": "devres", "condition": "rag", "split": "train", "question": "Why use a managed device allocation during probe?", "answer": "Its lifetime is tied to the device binding. The driver core releases it on failed probe or detach. [Managed device resources](https://docs.kernel.org/6.12/driver-api/driver-model/devres.html)", "retrieved": ["devres", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: Why use a managed device allocation during probe?"}
|
| 3 |
+
{"id": "77a8764dda4af95f", "passage": "devres", "condition": "closed", "split": "train", "question": "How can a driver unwind a set of managed acquisitions together?", "answer": "Use a devres group for the related acquisitions and release the group on failure.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: How can a driver unwind a set of managed acquisitions together?"}
|
| 4 |
+
{"id": "77a8764dda4af95f", "passage": "devres", "condition": "rag", "split": "train", "question": "How can a driver unwind a set of managed acquisitions together?", "answer": "Use a devres group for the related acquisitions and release the group on failure. [Managed device resources](https://docs.kernel.org/6.12/driver-api/driver-model/devres.html)", "retrieved": ["devres", "runtime-pm"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nQuestion: How can a driver unwind a set of managed acquisitions together?"}
|
| 5 |
+
{"id": "5038bc9da8d40bfd", "passage": "devres", "condition": "closed", "split": "train", "question": "Does managed cleanup alone stop asynchronous users of the allocation?", "answer": "The driver must arrange for outstanding users to stop before the resource is released.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Does managed cleanup alone stop asynchronous users of the allocation?"}
|
| 6 |
+
{"id": "5038bc9da8d40bfd", "passage": "devres", "condition": "rag", "split": "train", "question": "Does managed cleanup alone stop asynchronous users of the allocation?", "answer": "The driver must arrange for outstanding users to stop before the resource is released. [Managed device resources](https://docs.kernel.org/6.12/driver-api/driver-model/devres.html)", "retrieved": ["devres", "runtime-pm"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nQuestion: Does managed cleanup alone stop asynchronous users of the allocation?"}
|
| 7 |
+
{"id": "7df0dd120417c3a3", "passage": "dma", "condition": "closed", "split": "train", "question": "How should a driver check a dma_map_single result before submitting it?", "answer": "Call dma_mapping_error with the device and returned DMA address and handle failure before submission.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: How should a driver check a dma_map_single result before submitting it?"}
|
| 8 |
+
{"id": "7df0dd120417c3a3", "passage": "dma", "condition": "rag", "split": "train", "question": "How should a driver check a dma_map_single result before submitting it?", "answer": "Call dma_mapping_error with the device and returned DMA address and handle failure before submission. [DMA mapping, ownership and synchronization](https://docs.kernel.org/6.12/core-api/dma-api-howto.html)", "retrieved": ["dma", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDMA mapping, ownership and synchronization\nFurther reading: https://docs.kernel.org/6.12/core-api/dma-api-howto.html\nEditorial summary: A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: How should a driver check a dma_map_single result before submitting it?"}
|
| 9 |
+
{"id": "bf3275d4cb4e5e1b", "passage": "dma", "condition": "closed", "split": "train", "question": "When reusing a streaming DMA buffer, when may the CPU inspect device-written data?", "answer": "After the device has finished and the mapping has been synchronized for CPU access.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: When reusing a streaming DMA buffer, when may the CPU inspect device-written data?"}
|
| 10 |
+
{"id": "bf3275d4cb4e5e1b", "passage": "dma", "condition": "rag", "split": "train", "question": "When reusing a streaming DMA buffer, when may the CPU inspect device-written data?", "answer": "After the device has finished and the mapping has been synchronized for CPU access. [DMA mapping, ownership and synchronization](https://docs.kernel.org/6.12/core-api/dma-api-howto.html)", "retrieved": ["dma", "bus"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDMA mapping, ownership and synchronization\nFurther reading: https://docs.kernel.org/6.12/core-api/dma-api-howto.html\nEditorial summary: A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nQuestion: When reusing a streaming DMA buffer, when may the CPU inspect device-written data?"}
|
| 11 |
+
{"id": "bd16f5666843c414", "passage": "dma", "condition": "closed", "split": "train", "question": "Can a coherent DMA descriptor ring still need memory barriers?", "answer": "Yes. Coherent visibility alone does not order the writes that publish the descriptor.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Can a coherent DMA descriptor ring still need memory barriers?"}
|
| 12 |
+
{"id": "bd16f5666843c414", "passage": "dma", "condition": "rag", "split": "train", "question": "Can a coherent DMA descriptor ring still need memory barriers?", "answer": "Yes. Coherent visibility alone does not order the writes that publish the descriptor. [DMA mapping, ownership and synchronization](https://docs.kernel.org/6.12/core-api/dma-api-howto.html)", "retrieved": ["dma", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDMA mapping, ownership and synchronization\nFurther reading: https://docs.kernel.org/6.12/core-api/dma-api-howto.html\nEditorial summary: A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Can a coherent DMA descriptor ring still need memory barriers?"}
|
| 13 |
+
{"id": "5e56a28a26878863", "passage": "binding", "condition": "closed", "split": "train", "question": "A driver matches the device ID. Is initialization guaranteed to have succeeded?", "answer": "Matching selects a candidate. The probe callback still has to succeed before the driver is bound.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: A driver matches the device ID. Is initialization guaranteed to have succeeded?"}
|
| 14 |
+
{"id": "5e56a28a26878863", "passage": "binding", "condition": "rag", "split": "train", "question": "A driver matches the device ID. Is initialization guaranteed to have succeeded?", "answer": "The retrieved references do not establish that. I need a source on Driver binding and probe.", "retrieved": ["bus", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: A driver matches the device ID. Is initialization guaranteed to have succeeded?"}
|
| 15 |
+
{"id": "b19d23070e31bfd4", "passage": "binding", "condition": "closed", "split": "train", "question": "What can probe return if a necessary supplier has not initialized yet?", "answer": "Return -EPROBE_DEFER when retrying later could resolve the missing dependency.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: What can probe return if a necessary supplier has not initialized yet?"}
|
| 16 |
+
{"id": "b19d23070e31bfd4", "passage": "binding", "condition": "rag", "split": "train", "question": "What can probe return if a necessary supplier has not initialized yet?", "answer": "Return -EPROBE_DEFER when retrying later could resolve the missing dependency. [Driver binding and probe](https://docs.kernel.org/6.12/driver-api/driver-model/driver.html)", "retrieved": ["binding", "dma"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nDMA mapping, ownership and synchronization\nFurther reading: https://docs.kernel.org/6.12/core-api/dma-api-howto.html\nEditorial summary: A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers.\n\nQuestion: What can probe return if a necessary supplier has not initialized yet?"}
|
| 17 |
+
{"id": "d04f76a8c142c12e", "passage": "binding", "condition": "closed", "split": "train", "question": "Can the reference tell whether my own device's probe completed this morning?", "answer": "Check the actual device binding and relevant kernel logs. The documentation cannot establish the state of your machine.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Can the reference tell whether my own device's probe completed this morning?"}
|
| 18 |
+
{"id": "d04f76a8c142c12e", "passage": "binding", "condition": "rag", "split": "train", "question": "Can the reference tell whether my own device's probe completed this morning?", "answer": "Check the actual device binding and relevant kernel logs. The documentation cannot establish the state of your machine. [Driver binding and probe](https://docs.kernel.org/6.12/driver-api/driver-model/driver.html)", "retrieved": ["binding", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Can the reference tell whether my own device's probe completed this morning?"}
|
| 19 |
+
{"id": "017682e145d8af46", "passage": "sysfs", "condition": "closed", "split": "train", "question": "Which sysfs operations implement reads and writes of an ordinary device attribute?", "answer": "The show callback supplies read data, and the store callback handles a write.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Which sysfs operations implement reads and writes of an ordinary device attribute?"}
|
| 20 |
+
{"id": "017682e145d8af46", "passage": "sysfs", "condition": "rag", "split": "train", "question": "Which sysfs operations implement reads and writes of an ordinary device attribute?", "answer": "The show callback supplies read data, and the store callback handles a write. [Sysfs attribute conventions](https://docs.kernel.org/6.12/filesystems/sysfs.html)", "retrieved": ["sysfs", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Which sysfs operations implement reads and writes of an ordinary device attribute?"}
|
| 21 |
+
{"id": "28c3145e87a69ff4", "passage": "sysfs", "condition": "closed", "split": "train", "question": "Should a new driver pack an unrelated table of text fields into one sysfs attribute?", "answer": "Use separate attributes for separate values. A small array of values of the same type is an accepted convention.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Should a new driver pack an unrelated table of text fields into one sysfs attribute?"}
|
| 22 |
+
{"id": "28c3145e87a69ff4", "passage": "sysfs", "condition": "rag", "split": "train", "question": "Should a new driver pack an unrelated table of text fields into one sysfs attribute?", "answer": "Use separate attributes for separate values. A small array of values of the same type is an accepted convention. [Sysfs attribute conventions](https://docs.kernel.org/6.12/filesystems/sysfs.html)", "retrieved": ["sysfs", "bus"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nQuestion: Should a new driver pack an unrelated table of text fields into one sysfs attribute?"}
|
| 23 |
+
{"id": "f555badcda924a37", "passage": "sysfs", "condition": "closed", "split": "train", "question": "Do sysfs directories represent kernel objects or copies of every driver buffer?", "answer": "Directories reflect registered kernel objects. Their attribute files expose selected properties.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Do sysfs directories represent kernel objects or copies of every driver buffer?"}
|
| 24 |
+
{"id": "f555badcda924a37", "passage": "sysfs", "condition": "rag", "split": "train", "question": "Do sysfs directories represent kernel objects or copies of every driver buffer?", "answer": "Directories reflect registered kernel objects. Their attribute files expose selected properties. [Sysfs attribute conventions](https://docs.kernel.org/6.12/filesystems/sysfs.html)", "retrieved": ["sysfs", "bus"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nQuestion: Do sysfs directories represent kernel objects or copies of every driver buffer?"}
|
| 25 |
+
{"id": "bd3922f1f980db4a", "passage": "runtime-pm", "condition": "closed", "split": "train", "question": "How can runtime PM acquire a usage reference only if resuming succeeds?", "answer": "Use pm_runtime_resume_and_get and handle its return value before using the device.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: How can runtime PM acquire a usage reference only if resuming succeeds?"}
|
| 26 |
+
{"id": "bd3922f1f980db4a", "passage": "runtime-pm", "condition": "rag", "split": "train", "question": "How can runtime PM acquire a usage reference only if resuming succeeds?", "answer": "Use pm_runtime_resume_and_get and handle its return value before using the device. [Runtime power management usage counters](https://docs.kernel.org/6.12/power/runtime_pm.html)", "retrieved": ["runtime-pm"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nQuestion: How can runtime PM acquire a usage reference only if resuming succeeds?"}
|
| 27 |
+
{"id": "cbc1e9f6fe9a7f05", "passage": "runtime-pm", "condition": "closed", "split": "train", "question": "Should a successful runtime PM resume-and-get remain unbalanced after the operation?", "answer": "Release the usage reference when the operation finishes, using the put helper appropriate to the driver's policy.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Should a successful runtime PM resume-and-get remain unbalanced after the operation?"}
|
| 28 |
+
{"id": "cbc1e9f6fe9a7f05", "passage": "runtime-pm", "condition": "rag", "split": "train", "question": "Should a successful runtime PM resume-and-get remain unbalanced after the operation?", "answer": "Release the usage reference when the operation finishes, using the put helper appropriate to the driver's policy. [Runtime power management usage counters](https://docs.kernel.org/6.12/power/runtime_pm.html)", "retrieved": ["runtime-pm", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Should a successful runtime PM resume-and-get remain unbalanced after the operation?"}
|
| 29 |
+
{"id": "9d1996ad5c56685d", "passage": "runtime-pm", "condition": "closed", "split": "train", "question": "Why delay runtime autosuspend on a device with frequent short idle gaps?", "answer": "The delay can avoid repeated suspend and resume transitions between closely spaced operations.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Why delay runtime autosuspend on a device with frequent short idle gaps?"}
|
| 30 |
+
{"id": "9d1996ad5c56685d", "passage": "runtime-pm", "condition": "rag", "split": "train", "question": "Why delay runtime autosuspend on a device with frequent short idle gaps?", "answer": "The delay can avoid repeated suspend and resume transitions between closely spaced operations. [Runtime power management usage counters](https://docs.kernel.org/6.12/power/runtime_pm.html)", "retrieved": ["runtime-pm", "bus"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nQuestion: Why delay runtime autosuspend on a device with frequent short idle gaps?"}
|
| 31 |
+
{"id": "8ca972b7a9511ea4", "passage": "bus", "condition": "closed", "split": "train", "question": "What does a bus_type represent in the driver model?", "answer": "It describes a bus and its operations and connects the devices and drivers registered on that bus.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: What does a bus_type represent in the driver model?"}
|
| 32 |
+
{"id": "8ca972b7a9511ea4", "passage": "bus", "condition": "rag", "split": "train", "question": "What does a bus_type represent in the driver model?", "answer": "It describes a bus and its operations and connects the devices and drivers registered on that bus. [Linux bus device and driver registration](https://docs.kernel.org/6.12/driver-api/driver-model/bus.html)", "retrieved": ["bus", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: What does a bus_type represent in the driver model?"}
|
| 33 |
+
{"id": "f8c19451e270ded4", "passage": "bus", "condition": "closed", "split": "train", "question": "Who decides the bus-specific rules for matching a device to a candidate driver?", "answer": "The bus supplies the match callback.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Who decides the bus-specific rules for matching a device to a candidate driver?"}
|
| 34 |
+
{"id": "f8c19451e270ded4", "passage": "bus", "condition": "rag", "split": "train", "question": "Who decides the bus-specific rules for matching a device to a candidate driver?", "answer": "The bus supplies the match callback. [Linux bus device and driver registration](https://docs.kernel.org/6.12/driver-api/driver-model/bus.html)", "retrieved": ["bus", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: Who decides the bus-specific rules for matching a device to a candidate driver?"}
|
| 35 |
+
{"id": "2abc5dbccbd01705", "passage": "bus", "condition": "closed", "split": "train", "question": "Does adding a driver to a bus by itself prove a particular device is functioning?", "answer": "Inspect the device's binding and successful initialization. Registration by itself only makes a candidate driver available.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Does adding a driver to a bus by itself prove a particular device is functioning?"}
|
| 36 |
+
{"id": "2abc5dbccbd01705", "passage": "bus", "condition": "rag", "split": "train", "question": "Does adding a driver to a bus by itself prove a particular device is functioning?", "answer": "Inspect the device's binding and successful initialization. Registration by itself only makes a candidate driver available. [Linux bus device and driver registration](https://docs.kernel.org/6.12/driver-api/driver-model/bus.html)", "retrieved": ["bus", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: Does adding a driver to a bus by itself prove a particular device is functioning?"}
|
| 37 |
+
{"id": "439fc846eae2caf1", "passage": "kref", "condition": "closed", "split": "test", "question": "Should I take the kref before or after handing a pointer to a worker thread?", "answer": "Take a reference before the handoff so the object stays alive for the worker.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Should I take the kref before or after handing a pointer to a worker thread?"}
|
| 38 |
+
{"id": "439fc846eae2caf1", "passage": "kref", "condition": "rag", "split": "test", "question": "Should I take the kref before or after handing a pointer to a worker thread?", "answer": "Take a reference before the handoff so the object stays alive for the worker. [Object lifetime with kref references](https://docs.kernel.org/6.12/core-api/kref.html)", "retrieved": ["kref", "workqueue"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nObject lifetime with kref references\nFurther reading: https://docs.kernel.org/6.12/core-api/kref.html\nEditorial summary: A kref tracks object lifetime. Take a reference before handing an object to another thread, and drop the reference when that owner finishes. The last put calls the release function. Acquiring a reference through a lookup that has no existing valid reference requires serialization against final release.\n\nWorkqueue ordering and parallel execution\nFurther reading: https://docs.kernel.org/6.12/core-api/workqueue.html\nEditorial summary: Queued work items execute in worker context. When strict execution order is required, an ordered workqueue processes one item at a time in queue order. A general workqueue can have multiple workers. Choosing a bound or unbound workqueue determines how work execution relates to CPU affinity.\n\nQuestion: Should I take the kref before or after handing a pointer to a worker thread?"}
|
| 39 |
+
{"id": "85f79342c40b5e9a", "passage": "kref", "condition": "closed", "split": "test", "question": "When does kref_put invoke the release callback?", "answer": "When dropping that reference brings the count to zero.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: When does kref_put invoke the release callback?"}
|
| 40 |
+
{"id": "85f79342c40b5e9a", "passage": "kref", "condition": "rag", "split": "test", "question": "When does kref_put invoke the release callback?", "answer": "The retrieved references do not establish that. I need a source on Object lifetime with kref references.", "retrieved": ["sysfs", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: When does kref_put invoke the release callback?"}
|
| 41 |
+
{"id": "f9d70efd32d688b8", "passage": "kref", "condition": "closed", "split": "test", "question": "Can an unprotected table lookup race with the last kref_put?", "answer": "Yes. Serialize acquisition from that lookup with final release or use an appropriate lifetime protection scheme.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Can an unprotected table lookup race with the last kref_put?"}
|
| 42 |
+
{"id": "f9d70efd32d688b8", "passage": "kref", "condition": "rag", "split": "test", "question": "Can an unprotected table lookup race with the last kref_put?", "answer": "Yes. Serialize acquisition from that lookup with final release or use an appropriate lifetime protection scheme. [Object lifetime with kref references](https://docs.kernel.org/6.12/core-api/kref.html)", "retrieved": ["kref", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nObject lifetime with kref references\nFurther reading: https://docs.kernel.org/6.12/core-api/kref.html\nEditorial summary: A kref tracks object lifetime. Take a reference before handing an object to another thread, and drop the reference when that owner finishes. The last put calls the release function. Acquiring a reference through a lookup that has no existing valid reference requires serialization against final release.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Can an unprotected table lookup race with the last kref_put?"}
|
| 43 |
+
{"id": "ae6933352e3fdf1c", "passage": "workqueue", "condition": "closed", "split": "test", "question": "Two queued work items must execute strictly in submission order. Which workqueue fits?", "answer": "Use an ordered workqueue so it runs one item at a time in queue order.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Two queued work items must execute strictly in submission order. Which workqueue fits?"}
|
| 44 |
+
{"id": "ae6933352e3fdf1c", "passage": "workqueue", "condition": "rag", "split": "test", "question": "Two queued work items must execute strictly in submission order. Which workqueue fits?", "answer": "Use an ordered workqueue so it runs one item at a time in queue order. [Workqueue ordering and parallel execution](https://docs.kernel.org/6.12/core-api/workqueue.html)", "retrieved": ["workqueue", "device-links"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nWorkqueue ordering and parallel execution\nFurther reading: https://docs.kernel.org/6.12/core-api/workqueue.html\nEditorial summary: Queued work items execute in worker context. When strict execution order is required, an ordered workqueue processes one item at a time in queue order. A general workqueue can have multiple workers. Choosing a bound or unbound workqueue determines how work execution relates to CPU affinity.\n\nDevice links between a consumer and a supplier\nFurther reading: https://docs.kernel.org/6.12/driver-api/device_link.html\nEditorial summary: A device link describes a consumer's dependency on a supplier. Managed links can enforce driver binding and power-management ordering. A consumer should be suspended before its supplier, and the supplier resumed before the consumer. Flags and link type determine which relationships the core enforces.\n\nQuestion: Two queued work items must execute strictly in submission order. Which workqueue fits?"}
|
| 45 |
+
{"id": "1798bd7a085d8722", "passage": "workqueue", "condition": "closed", "split": "test", "question": "Will two unrelated work items on a general workqueue always run serially?", "answer": "No. General workqueues can execute multiple items concurrently.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Will two unrelated work items on a general workqueue always run serially?"}
|
| 46 |
+
{"id": "1798bd7a085d8722", "passage": "workqueue", "condition": "rag", "split": "test", "question": "Will two unrelated work items on a general workqueue always run serially?", "answer": "No. General workqueues can execute multiple items concurrently. [Workqueue ordering and parallel execution](https://docs.kernel.org/6.12/core-api/workqueue.html)", "retrieved": ["workqueue", "kref"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nWorkqueue ordering and parallel execution\nFurther reading: https://docs.kernel.org/6.12/core-api/workqueue.html\nEditorial summary: Queued work items execute in worker context. When strict execution order is required, an ordered workqueue processes one item at a time in queue order. A general workqueue can have multiple workers. Choosing a bound or unbound workqueue determines how work execution relates to CPU affinity.\n\nObject lifetime with kref references\nFurther reading: https://docs.kernel.org/6.12/core-api/kref.html\nEditorial summary: A kref tracks object lifetime. Take a reference before handing an object to another thread, and drop the reference when that owner finishes. The last put calls the release function. Acquiring a reference through a lookup that has no existing valid reference requires serialization against final release.\n\nQuestion: Will two unrelated work items on a general workqueue always run serially?"}
|
| 47 |
+
{"id": "f32d82eb1157a625", "passage": "device-links", "condition": "closed", "split": "test", "question": "For a device link, which resumes first: a consumer or its supplier?", "answer": "Resume the supplier before the dependent consumer.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: For a device link, which resumes first: a consumer or its supplier?"}
|
| 48 |
+
{"id": "f32d82eb1157a625", "passage": "device-links", "condition": "rag", "split": "test", "question": "For a device link, which resumes first: a consumer or its supplier?", "answer": "Resume the supplier before the dependent consumer. [Device links between a consumer and a supplier](https://docs.kernel.org/6.12/driver-api/device_link.html)", "retrieved": ["device-links", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDevice links between a consumer and a supplier\nFurther reading: https://docs.kernel.org/6.12/driver-api/device_link.html\nEditorial summary: A device link describes a consumer's dependency on a supplier. Managed links can enforce driver binding and power-management ordering. A consumer should be suspended before its supplier, and the supplier resumed before the consumer. Flags and link type determine which relationships the core enforces.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: For a device link, which resumes first: a consumer or its supplier?"}
|
| 49 |
+
{"id": "e6ea86b753a2fe78", "passage": "device-links", "condition": "closed", "split": "test", "question": "Why would a driver describe a dependency by adding a device link?", "answer": "It gives the driver core an explicit consumer-supplier relationship for the applicable binding and power-management ordering.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Why would a driver describe a dependency by adding a device link?"}
|
| 50 |
+
{"id": "e6ea86b753a2fe78", "passage": "device-links", "condition": "rag", "split": "test", "question": "Why would a driver describe a dependency by adding a device link?", "answer": "It gives the driver core an explicit consumer-supplier relationship for the applicable binding and power-management ordering. [Device links between a consumer and a supplier](https://docs.kernel.org/6.12/driver-api/device_link.html)", "retrieved": ["device-links", "sysfs"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDevice links between a consumer and a supplier\nFurther reading: https://docs.kernel.org/6.12/driver-api/device_link.html\nEditorial summary: A device link describes a consumer's dependency on a supplier. Managed links can enforce driver binding and power-management ordering. A consumer should be suspended before its supplier, and the supplier resumed before the consumer. Flags and link type determine which relationships the core enforces.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nQuestion: Why would a driver describe a dependency by adding a device link?"}
|
data/sources.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "devres",
|
| 4 |
+
"url": "https://docs.kernel.org/6.12/driver-api/driver-model/devres.html",
|
| 5 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/driver-api/driver-model/devres.rst",
|
| 6 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 7 |
+
"sha256": "5c1cfcdb1aecf80a62817b56c001fe941a54dcbcb565c80c52d597856cf4ab80"
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"id": "dma",
|
| 11 |
+
"url": "https://docs.kernel.org/6.12/core-api/dma-api-howto.html",
|
| 12 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/core-api/dma-api-howto.rst",
|
| 13 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 14 |
+
"sha256": "abe4374de5908e154080ee6452667af79605c8bd21bf22cbbfb9c632f067e7c0"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"id": "binding",
|
| 18 |
+
"url": "https://docs.kernel.org/6.12/driver-api/driver-model/driver.html",
|
| 19 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/driver-api/driver-model/driver.rst",
|
| 20 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 21 |
+
"sha256": "26888df4ebaa27d1b351494d2d31da6540607d7f40d47904351b1cddebe275d0"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"id": "sysfs",
|
| 25 |
+
"url": "https://docs.kernel.org/6.12/filesystems/sysfs.html",
|
| 26 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/filesystems/sysfs.rst",
|
| 27 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 28 |
+
"sha256": "2b9acca3fbb9730e25ed5c5124f67b9dc37acc057f3fcad22e603cd400555e7a"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"id": "runtime-pm",
|
| 32 |
+
"url": "https://docs.kernel.org/6.12/power/runtime_pm.html",
|
| 33 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/power/runtime_pm.rst",
|
| 34 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 35 |
+
"sha256": "046315b56c44d9233370895c8359e73df847a924aec3b947e15444c2773c3869"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"id": "bus",
|
| 39 |
+
"url": "https://docs.kernel.org/6.12/driver-api/driver-model/bus.html",
|
| 40 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/driver-api/driver-model/bus.rst",
|
| 41 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 42 |
+
"sha256": "57fa8cb92e0e630cc48edddab4d25ebbf468df6139180218c66f3f52d7c83e00"
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"id": "kref",
|
| 46 |
+
"url": "https://docs.kernel.org/6.12/core-api/kref.html",
|
| 47 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/core-api/kref.rst",
|
| 48 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 49 |
+
"sha256": "5724ae3846fa826b8678e909d41ba7ec43c37713f42335cc14f3b080181893e6"
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"id": "workqueue",
|
| 53 |
+
"url": "https://docs.kernel.org/6.12/core-api/workqueue.html",
|
| 54 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/core-api/workqueue.rst",
|
| 55 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 56 |
+
"sha256": "c406ea880503a459a44d5152f13f058f31ccd55f70cbd59cc772d7d812cb8145"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"id": "device-links",
|
| 60 |
+
"url": "https://docs.kernel.org/6.12/driver-api/device_link.html",
|
| 61 |
+
"upstream": "https://raw.githubusercontent.com/torvalds/linux/adc218676eef25575469234709c2d87185ca223a/Documentation/driver-api/device_link.rst",
|
| 62 |
+
"revision": "adc218676eef25575469234709c2d87185ca223a",
|
| 63 |
+
"sha256": "eb66a6b08f54d69fcbfad66a446ff2648fc67ef36996854425501dbfdbae9edd"
|
| 64 |
+
}
|
| 65 |
+
]
|
data/specialist.toml
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model = "cybermodels-linux-drivers"
|
| 2 |
+
topic = "Linux driver maintenance"
|
| 3 |
+
summary = "Driver resource lifetime, DMA ownership, device binding and power management in Linux 6.12."
|
| 4 |
+
source_root = "https://docs.kernel.org/6.12/"
|
| 5 |
+
source_revision = "v6.12"
|
| 6 |
+
|
| 7 |
+
[[source]]
|
| 8 |
+
id = "devres"
|
| 9 |
+
title = "Managed device resources"
|
| 10 |
+
path = "driver-api/driver-model/devres.html"
|
| 11 |
+
notes = "A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release."
|
| 12 |
+
qa = [
|
| 13 |
+
["Why use a managed device allocation during probe?", "Its lifetime is tied to the device binding. The driver core releases it on failed probe or detach."],
|
| 14 |
+
["How can a driver unwind a set of managed acquisitions together?", "Use a devres group for the related acquisitions and release the group on failure."],
|
| 15 |
+
["Does managed cleanup alone stop asynchronous users of the allocation?", "The driver must arrange for outstanding users to stop before the resource is released."]
|
| 16 |
+
]
|
| 17 |
+
|
| 18 |
+
[[source]]
|
| 19 |
+
id = "dma"
|
| 20 |
+
title = "DMA mapping, ownership and synchronization"
|
| 21 |
+
path = "core-api/dma-api-howto.html"
|
| 22 |
+
notes = "A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers."
|
| 23 |
+
qa = [
|
| 24 |
+
["How should a driver check a dma_map_single result before submitting it?", "Call dma_mapping_error with the device and returned DMA address and handle failure before submission."],
|
| 25 |
+
["When reusing a streaming DMA buffer, when may the CPU inspect device-written data?", "After the device has finished and the mapping has been synchronized for CPU access."],
|
| 26 |
+
["Can a coherent DMA descriptor ring still need memory barriers?", "Yes. Coherent visibility alone does not order the writes that publish the descriptor."]
|
| 27 |
+
]
|
| 28 |
+
|
| 29 |
+
[[source]]
|
| 30 |
+
id = "binding"
|
| 31 |
+
title = "Driver binding and probe"
|
| 32 |
+
path = "driver-api/driver-model/driver.html"
|
| 33 |
+
notes = "Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry."
|
| 34 |
+
qa = [
|
| 35 |
+
["A driver matches the device ID. Is initialization guaranteed to have succeeded?", "Matching selects a candidate. The probe callback still has to succeed before the driver is bound."],
|
| 36 |
+
["What can probe return if a necessary supplier has not initialized yet?", "Return -EPROBE_DEFER when retrying later could resolve the missing dependency."],
|
| 37 |
+
["Can the reference tell whether my own device's probe completed this morning?", "Check the actual device binding and relevant kernel logs. The documentation cannot establish the state of your machine."]
|
| 38 |
+
]
|
| 39 |
+
|
| 40 |
+
[[source]]
|
| 41 |
+
id = "sysfs"
|
| 42 |
+
title = "Sysfs attribute conventions"
|
| 43 |
+
path = "filesystems/sysfs.html"
|
| 44 |
+
notes = "Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate."
|
| 45 |
+
qa = [
|
| 46 |
+
["Which sysfs operations implement reads and writes of an ordinary device attribute?", "The show callback supplies read data, and the store callback handles a write."],
|
| 47 |
+
["Should a new driver pack an unrelated table of text fields into one sysfs attribute?", "Use separate attributes for separate values. A small array of values of the same type is an accepted convention."],
|
| 48 |
+
["Do sysfs directories represent kernel objects or copies of every driver buffer?", "Directories reflect registered kernel objects. Their attribute files expose selected properties."]
|
| 49 |
+
]
|
| 50 |
+
|
| 51 |
+
[[source]]
|
| 52 |
+
id = "runtime-pm"
|
| 53 |
+
title = "Runtime power management usage counters"
|
| 54 |
+
path = "power/runtime_pm.html"
|
| 55 |
+
notes = "A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling."
|
| 56 |
+
qa = [
|
| 57 |
+
["How can runtime PM acquire a usage reference only if resuming succeeds?", "Use pm_runtime_resume_and_get and handle its return value before using the device."],
|
| 58 |
+
["Should a successful runtime PM resume-and-get remain unbalanced after the operation?", "Release the usage reference when the operation finishes, using the put helper appropriate to the driver's policy."],
|
| 59 |
+
["Why delay runtime autosuspend on a device with frequent short idle gaps?", "The delay can avoid repeated suspend and resume transitions between closely spaced operations."]
|
| 60 |
+
]
|
| 61 |
+
|
| 62 |
+
[[source]]
|
| 63 |
+
id = "bus"
|
| 64 |
+
title = "Linux bus device and driver registration"
|
| 65 |
+
path = "driver-api/driver-model/bus.html"
|
| 66 |
+
notes = "The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device."
|
| 67 |
+
qa = [
|
| 68 |
+
["What does a bus_type represent in the driver model?", "It describes a bus and its operations and connects the devices and drivers registered on that bus."],
|
| 69 |
+
["Who decides the bus-specific rules for matching a device to a candidate driver?", "The bus supplies the match callback."],
|
| 70 |
+
["Does adding a driver to a bus by itself prove a particular device is functioning?", "Inspect the device's binding and successful initialization. Registration by itself only makes a candidate driver available."]
|
| 71 |
+
]
|
| 72 |
+
|
| 73 |
+
[[source]]
|
| 74 |
+
id = "kref"
|
| 75 |
+
title = "Object lifetime with kref references"
|
| 76 |
+
path = "core-api/kref.html"
|
| 77 |
+
split = "test"
|
| 78 |
+
notes = "A kref tracks object lifetime. Take a reference before handing an object to another thread, and drop the reference when that owner finishes. The last put calls the release function. Acquiring a reference through a lookup that has no existing valid reference requires serialization against final release."
|
| 79 |
+
qa = [
|
| 80 |
+
["Should I take the kref before or after handing a pointer to a worker thread?", "Take a reference before the handoff so the object stays alive for the worker."],
|
| 81 |
+
["When does kref_put invoke the release callback?", "When dropping that reference brings the count to zero."],
|
| 82 |
+
["Can an unprotected table lookup race with the last kref_put?", "Yes. Serialize acquisition from that lookup with final release or use an appropriate lifetime protection scheme."]
|
| 83 |
+
]
|
| 84 |
+
|
| 85 |
+
[[source]]
|
| 86 |
+
id = "workqueue"
|
| 87 |
+
title = "Workqueue ordering and parallel execution"
|
| 88 |
+
path = "core-api/workqueue.html"
|
| 89 |
+
split = "test"
|
| 90 |
+
notes = "Queued work items execute in worker context. When strict execution order is required, an ordered workqueue processes one item at a time in queue order. A general workqueue can have multiple workers. Choosing a bound or unbound workqueue determines how work execution relates to CPU affinity."
|
| 91 |
+
qa = [
|
| 92 |
+
["Two queued work items must execute strictly in submission order. Which workqueue fits?", "Use an ordered workqueue so it runs one item at a time in queue order."],
|
| 93 |
+
["Will two unrelated work items on a general workqueue always run serially?", "No. General workqueues can execute multiple items concurrently."]
|
| 94 |
+
]
|
| 95 |
+
|
| 96 |
+
[[source]]
|
| 97 |
+
id = "device-links"
|
| 98 |
+
title = "Device links between a consumer and a supplier"
|
| 99 |
+
path = "driver-api/device_link.html"
|
| 100 |
+
split = "test"
|
| 101 |
+
notes = "A device link describes a consumer's dependency on a supplier. Managed links can enforce driver binding and power-management ordering. A consumer should be suspended before its supplier, and the supplier resumed before the consumer. Flags and link type determine which relationships the core enforces."
|
| 102 |
+
qa = [
|
| 103 |
+
["For a device link, which resumes first: a consumer or its supplier?", "Resume the supplier before the dependent consumer."],
|
| 104 |
+
["Why would a driver describe a dependency by adding a device link?", "It gives the driver core an explicit consumer-supplier relationship for the applicable binding and power-management ordering."]
|
| 105 |
+
]
|
data/train.jsonl
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id": "e46bf54e6efef4fe", "passage": "devres", "condition": "closed", "split": "train", "question": "Why use a managed device allocation during probe?", "answer": "Its lifetime is tied to the device binding. The driver core releases it on failed probe or detach.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Why use a managed device allocation during probe?"}
|
| 2 |
+
{"id": "e46bf54e6efef4fe", "passage": "devres", "condition": "rag", "split": "train", "question": "Why use a managed device allocation during probe?", "answer": "Its lifetime is tied to the device binding. The driver core releases it on failed probe or detach. [Managed device resources](https://docs.kernel.org/6.12/driver-api/driver-model/devres.html)", "retrieved": ["devres", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: Why use a managed device allocation during probe?"}
|
| 3 |
+
{"id": "77a8764dda4af95f", "passage": "devres", "condition": "closed", "split": "train", "question": "How can a driver unwind a set of managed acquisitions together?", "answer": "Use a devres group for the related acquisitions and release the group on failure.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: How can a driver unwind a set of managed acquisitions together?"}
|
| 4 |
+
{"id": "77a8764dda4af95f", "passage": "devres", "condition": "rag", "split": "train", "question": "How can a driver unwind a set of managed acquisitions together?", "answer": "Use a devres group for the related acquisitions and release the group on failure. [Managed device resources](https://docs.kernel.org/6.12/driver-api/driver-model/devres.html)", "retrieved": ["devres", "runtime-pm"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nQuestion: How can a driver unwind a set of managed acquisitions together?"}
|
| 5 |
+
{"id": "5038bc9da8d40bfd", "passage": "devres", "condition": "closed", "split": "train", "question": "Does managed cleanup alone stop asynchronous users of the allocation?", "answer": "The driver must arrange for outstanding users to stop before the resource is released.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Does managed cleanup alone stop asynchronous users of the allocation?"}
|
| 6 |
+
{"id": "5038bc9da8d40bfd", "passage": "devres", "condition": "rag", "split": "train", "question": "Does managed cleanup alone stop asynchronous users of the allocation?", "answer": "The driver must arrange for outstanding users to stop before the resource is released. [Managed device resources](https://docs.kernel.org/6.12/driver-api/driver-model/devres.html)", "retrieved": ["devres", "runtime-pm"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nQuestion: Does managed cleanup alone stop asynchronous users of the allocation?"}
|
| 7 |
+
{"id": "7df0dd120417c3a3", "passage": "dma", "condition": "closed", "split": "train", "question": "How should a driver check a dma_map_single result before submitting it?", "answer": "Call dma_mapping_error with the device and returned DMA address and handle failure before submission.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: How should a driver check a dma_map_single result before submitting it?"}
|
| 8 |
+
{"id": "7df0dd120417c3a3", "passage": "dma", "condition": "rag", "split": "train", "question": "How should a driver check a dma_map_single result before submitting it?", "answer": "Call dma_mapping_error with the device and returned DMA address and handle failure before submission. [DMA mapping, ownership and synchronization](https://docs.kernel.org/6.12/core-api/dma-api-howto.html)", "retrieved": ["dma", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDMA mapping, ownership and synchronization\nFurther reading: https://docs.kernel.org/6.12/core-api/dma-api-howto.html\nEditorial summary: A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: How should a driver check a dma_map_single result before submitting it?"}
|
| 9 |
+
{"id": "bf3275d4cb4e5e1b", "passage": "dma", "condition": "closed", "split": "train", "question": "When reusing a streaming DMA buffer, when may the CPU inspect device-written data?", "answer": "After the device has finished and the mapping has been synchronized for CPU access.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: When reusing a streaming DMA buffer, when may the CPU inspect device-written data?"}
|
| 10 |
+
{"id": "bf3275d4cb4e5e1b", "passage": "dma", "condition": "rag", "split": "train", "question": "When reusing a streaming DMA buffer, when may the CPU inspect device-written data?", "answer": "After the device has finished and the mapping has been synchronized for CPU access. [DMA mapping, ownership and synchronization](https://docs.kernel.org/6.12/core-api/dma-api-howto.html)", "retrieved": ["dma", "bus"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDMA mapping, ownership and synchronization\nFurther reading: https://docs.kernel.org/6.12/core-api/dma-api-howto.html\nEditorial summary: A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nQuestion: When reusing a streaming DMA buffer, when may the CPU inspect device-written data?"}
|
| 11 |
+
{"id": "bd16f5666843c414", "passage": "dma", "condition": "closed", "split": "train", "question": "Can a coherent DMA descriptor ring still need memory barriers?", "answer": "Yes. Coherent visibility alone does not order the writes that publish the descriptor.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Can a coherent DMA descriptor ring still need memory barriers?"}
|
| 12 |
+
{"id": "bd16f5666843c414", "passage": "dma", "condition": "rag", "split": "train", "question": "Can a coherent DMA descriptor ring still need memory barriers?", "answer": "Yes. Coherent visibility alone does not order the writes that publish the descriptor. [DMA mapping, ownership and synchronization](https://docs.kernel.org/6.12/core-api/dma-api-howto.html)", "retrieved": ["dma", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDMA mapping, ownership and synchronization\nFurther reading: https://docs.kernel.org/6.12/core-api/dma-api-howto.html\nEditorial summary: A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Can a coherent DMA descriptor ring still need memory barriers?"}
|
| 13 |
+
{"id": "5e56a28a26878863", "passage": "binding", "condition": "closed", "split": "train", "question": "A driver matches the device ID. Is initialization guaranteed to have succeeded?", "answer": "Matching selects a candidate. The probe callback still has to succeed before the driver is bound.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: A driver matches the device ID. Is initialization guaranteed to have succeeded?"}
|
| 14 |
+
{"id": "5e56a28a26878863", "passage": "binding", "condition": "rag", "split": "train", "question": "A driver matches the device ID. Is initialization guaranteed to have succeeded?", "answer": "The retrieved references do not establish that. I need a source on Driver binding and probe.", "retrieved": ["bus", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: A driver matches the device ID. Is initialization guaranteed to have succeeded?"}
|
| 15 |
+
{"id": "b19d23070e31bfd4", "passage": "binding", "condition": "closed", "split": "train", "question": "What can probe return if a necessary supplier has not initialized yet?", "answer": "Return -EPROBE_DEFER when retrying later could resolve the missing dependency.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: What can probe return if a necessary supplier has not initialized yet?"}
|
| 16 |
+
{"id": "b19d23070e31bfd4", "passage": "binding", "condition": "rag", "split": "train", "question": "What can probe return if a necessary supplier has not initialized yet?", "answer": "Return -EPROBE_DEFER when retrying later could resolve the missing dependency. [Driver binding and probe](https://docs.kernel.org/6.12/driver-api/driver-model/driver.html)", "retrieved": ["binding", "dma"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nDMA mapping, ownership and synchronization\nFurther reading: https://docs.kernel.org/6.12/core-api/dma-api-howto.html\nEditorial summary: A streaming DMA mapping has a transfer direction and an ownership interval. Check whether dma_map_single succeeded with dma_mapping_error. For a reused mapping, synchronize for the CPU before examining device-written data and synchronize for the device before returning the buffer. Coherent mappings still need appropriate ordering barriers.\n\nQuestion: What can probe return if a necessary supplier has not initialized yet?"}
|
| 17 |
+
{"id": "d04f76a8c142c12e", "passage": "binding", "condition": "closed", "split": "train", "question": "Can the reference tell whether my own device's probe completed this morning?", "answer": "Check the actual device binding and relevant kernel logs. The documentation cannot establish the state of your machine.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Can the reference tell whether my own device's probe completed this morning?"}
|
| 18 |
+
{"id": "d04f76a8c142c12e", "passage": "binding", "condition": "rag", "split": "train", "question": "Can the reference tell whether my own device's probe completed this morning?", "answer": "Check the actual device binding and relevant kernel logs. The documentation cannot establish the state of your machine. [Driver binding and probe](https://docs.kernel.org/6.12/driver-api/driver-model/driver.html)", "retrieved": ["binding", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Can the reference tell whether my own device's probe completed this morning?"}
|
| 19 |
+
{"id": "017682e145d8af46", "passage": "sysfs", "condition": "closed", "split": "train", "question": "Which sysfs operations implement reads and writes of an ordinary device attribute?", "answer": "The show callback supplies read data, and the store callback handles a write.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Which sysfs operations implement reads and writes of an ordinary device attribute?"}
|
| 20 |
+
{"id": "017682e145d8af46", "passage": "sysfs", "condition": "rag", "split": "train", "question": "Which sysfs operations implement reads and writes of an ordinary device attribute?", "answer": "The show callback supplies read data, and the store callback handles a write. [Sysfs attribute conventions](https://docs.kernel.org/6.12/filesystems/sysfs.html)", "retrieved": ["sysfs", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Which sysfs operations implement reads and writes of an ordinary device attribute?"}
|
| 21 |
+
{"id": "28c3145e87a69ff4", "passage": "sysfs", "condition": "closed", "split": "train", "question": "Should a new driver pack an unrelated table of text fields into one sysfs attribute?", "answer": "Use separate attributes for separate values. A small array of values of the same type is an accepted convention.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Should a new driver pack an unrelated table of text fields into one sysfs attribute?"}
|
| 22 |
+
{"id": "28c3145e87a69ff4", "passage": "sysfs", "condition": "rag", "split": "train", "question": "Should a new driver pack an unrelated table of text fields into one sysfs attribute?", "answer": "Use separate attributes for separate values. A small array of values of the same type is an accepted convention. [Sysfs attribute conventions](https://docs.kernel.org/6.12/filesystems/sysfs.html)", "retrieved": ["sysfs", "bus"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nQuestion: Should a new driver pack an unrelated table of text fields into one sysfs attribute?"}
|
| 23 |
+
{"id": "f555badcda924a37", "passage": "sysfs", "condition": "closed", "split": "train", "question": "Do sysfs directories represent kernel objects or copies of every driver buffer?", "answer": "Directories reflect registered kernel objects. Their attribute files expose selected properties.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Do sysfs directories represent kernel objects or copies of every driver buffer?"}
|
| 24 |
+
{"id": "f555badcda924a37", "passage": "sysfs", "condition": "rag", "split": "train", "question": "Do sysfs directories represent kernel objects or copies of every driver buffer?", "answer": "Directories reflect registered kernel objects. Their attribute files expose selected properties. [Sysfs attribute conventions](https://docs.kernel.org/6.12/filesystems/sysfs.html)", "retrieved": ["sysfs", "bus"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nSysfs attribute conventions\nFurther reading: https://docs.kernel.org/6.12/filesystems/sysfs.html\nEditorial summary: Sysfs exposes kernel objects and their attributes as directories and files. An ordinary attribute uses a show callback for reads and a store callback for writes. Text attributes conventionally describe one value; a simple array of values of the same type can also be appropriate.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nQuestion: Do sysfs directories represent kernel objects or copies of every driver buffer?"}
|
| 25 |
+
{"id": "bd3922f1f980db4a", "passage": "runtime-pm", "condition": "closed", "split": "train", "question": "How can runtime PM acquire a usage reference only if resuming succeeds?", "answer": "Use pm_runtime_resume_and_get and handle its return value before using the device.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: How can runtime PM acquire a usage reference only if resuming succeeds?"}
|
| 26 |
+
{"id": "bd3922f1f980db4a", "passage": "runtime-pm", "condition": "rag", "split": "train", "question": "How can runtime PM acquire a usage reference only if resuming succeeds?", "answer": "Use pm_runtime_resume_and_get and handle its return value before using the device. [Runtime power management usage counters](https://docs.kernel.org/6.12/power/runtime_pm.html)", "retrieved": ["runtime-pm"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nQuestion: How can runtime PM acquire a usage reference only if resuming succeeds?"}
|
| 27 |
+
{"id": "cbc1e9f6fe9a7f05", "passage": "runtime-pm", "condition": "closed", "split": "train", "question": "Should a successful runtime PM resume-and-get remain unbalanced after the operation?", "answer": "Release the usage reference when the operation finishes, using the put helper appropriate to the driver's policy.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Should a successful runtime PM resume-and-get remain unbalanced after the operation?"}
|
| 28 |
+
{"id": "cbc1e9f6fe9a7f05", "passage": "runtime-pm", "condition": "rag", "split": "train", "question": "Should a successful runtime PM resume-and-get remain unbalanced after the operation?", "answer": "Release the usage reference when the operation finishes, using the put helper appropriate to the driver's policy. [Runtime power management usage counters](https://docs.kernel.org/6.12/power/runtime_pm.html)", "retrieved": ["runtime-pm", "devres"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nManaged device resources\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/devres.html\nEditorial summary: A managed allocation belongs to a device and normally lasts until driver detach or failed probe cleanup. Devres groups collect related acquisitions so they can be released together if part of an operation fails. Drivers still have to stop users of a resource before its release.\n\nQuestion: Should a successful runtime PM resume-and-get remain unbalanced after the operation?"}
|
| 29 |
+
{"id": "9d1996ad5c56685d", "passage": "runtime-pm", "condition": "closed", "split": "train", "question": "Why delay runtime autosuspend on a device with frequent short idle gaps?", "answer": "The delay can avoid repeated suspend and resume transitions between closely spaced operations.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Why delay runtime autosuspend on a device with frequent short idle gaps?"}
|
| 30 |
+
{"id": "9d1996ad5c56685d", "passage": "runtime-pm", "condition": "rag", "split": "train", "question": "Why delay runtime autosuspend on a device with frequent short idle gaps?", "answer": "The delay can avoid repeated suspend and resume transitions between closely spaced operations. [Runtime power management usage counters](https://docs.kernel.org/6.12/power/runtime_pm.html)", "retrieved": ["runtime-pm", "bus"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nRuntime power management usage counters\nFurther reading: https://docs.kernel.org/6.12/power/runtime_pm.html\nEditorial summary: A runtime PM usage count tracks users that need a device active. A driver can acquire an active device with pm_runtime_resume_and_get and balance successful acquisitions on its release path. Autosuspend can delay suspension after a device becomes idle to avoid rapid power cycling.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nQuestion: Why delay runtime autosuspend on a device with frequent short idle gaps?"}
|
| 31 |
+
{"id": "8ca972b7a9511ea4", "passage": "bus", "condition": "closed", "split": "train", "question": "What does a bus_type represent in the driver model?", "answer": "It describes a bus and its operations and connects the devices and drivers registered on that bus.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: What does a bus_type represent in the driver model?"}
|
| 32 |
+
{"id": "8ca972b7a9511ea4", "passage": "bus", "condition": "rag", "split": "train", "question": "What does a bus_type represent in the driver model?", "answer": "It describes a bus and its operations and connects the devices and drivers registered on that bus. [Linux bus device and driver registration](https://docs.kernel.org/6.12/driver-api/driver-model/bus.html)", "retrieved": ["bus", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: What does a bus_type represent in the driver model?"}
|
| 33 |
+
{"id": "f8c19451e270ded4", "passage": "bus", "condition": "closed", "split": "train", "question": "Who decides the bus-specific rules for matching a device to a candidate driver?", "answer": "The bus supplies the match callback.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Who decides the bus-specific rules for matching a device to a candidate driver?"}
|
| 34 |
+
{"id": "f8c19451e270ded4", "passage": "bus", "condition": "rag", "split": "train", "question": "Who decides the bus-specific rules for matching a device to a candidate driver?", "answer": "The bus supplies the match callback. [Linux bus device and driver registration](https://docs.kernel.org/6.12/driver-api/driver-model/bus.html)", "retrieved": ["bus", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: Who decides the bus-specific rules for matching a device to a candidate driver?"}
|
| 35 |
+
{"id": "2abc5dbccbd01705", "passage": "bus", "condition": "closed", "split": "train", "question": "Does adding a driver to a bus by itself prove a particular device is functioning?", "answer": "Inspect the device's binding and successful initialization. Registration by itself only makes a candidate driver available.", "retrieved": [], "prompt": "Answer the Linux driver maintenance question concisely.\nQuestion: Does adding a driver to a bus by itself prove a particular device is functioning?"}
|
| 36 |
+
{"id": "2abc5dbccbd01705", "passage": "bus", "condition": "rag", "split": "train", "question": "Does adding a driver to a bus by itself prove a particular device is functioning?", "answer": "Inspect the device's binding and successful initialization. Registration by itself only makes a candidate driver available. [Linux bus device and driver registration](https://docs.kernel.org/6.12/driver-api/driver-model/bus.html)", "retrieved": ["bus", "binding"], "prompt": "Answer the Linux driver maintenance question concisely. Use relevant information below and link the supporting reference. These summaries are paraphrases by Hyperion Gray. Use your own words. If the notes do not establish the answer, say what information is missing.\n\nLinux bus device and driver registration\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/bus.html\nEditorial summary: The Linux driver model represents a bus as a bus_type. A registered bus maintains collections of devices and drivers. Its match callback compares candidates according to bus-specific rules. Enumeration and matching are distinct from a driver's initialization of a particular device.\n\nDriver binding and probe\nFurther reading: https://docs.kernel.org/6.12/driver-api/driver-model/driver.html\nEditorial summary: Bus matching identifies a candidate driver for a device. Its probe callback establishes whether it can support that device and initializes it. A successful probe binds the device. If a required supplier will become available later, a driver can return -EPROBE_DEFER so the core can retry.\n\nQuestion: Does adding a driver to a bus by itself prove a particular device is functioning?"}
|
gpuless_provenance.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "gpuless.peft-export/v1",
|
| 3 |
+
"native_sha256": "758a64f627090f87bc71f384b3b6da55305f2e15e22f0f8e48412c8b7cf0be64",
|
| 4 |
+
"model_id": "qwennifer-flash",
|
| 5 |
+
"model_revision": "4640a0404660246e2bde9c607a1be3e47d29751f2d3753b29c65dccdb8d54051",
|
| 6 |
+
"target_count": 1,
|
| 7 |
+
"targets": [
|
| 8 |
+
{
|
| 9 |
+
"model_id": "qwennifer-flash",
|
| 10 |
+
"model_revision": "4640a0404660246e2bde9c607a1be3e47d29751f2d3753b29c65dccdb8d54051",
|
| 11 |
+
"target_name": "lm_head",
|
| 12 |
+
"rank": 4,
|
| 13 |
+
"in_features": 2048,
|
| 14 |
+
"out_features": 151936,
|
| 15 |
+
"generation": 0,
|
| 16 |
+
"step": 0,
|
| 17 |
+
"alpha": 4.0,
|
| 18 |
+
"scale": 1.0,
|
| 19 |
+
"a_elements": 8192,
|
| 20 |
+
"b_elements": 607744,
|
| 21 |
+
"sha256": "758a64f627090f87bc71f384b3b6da55305f2e15e22f0f8e48412c8b7cf0be64"
|
| 22 |
+
}
|
| 23 |
+
],
|
| 24 |
+
"requires_original_base_model": true
|
| 25 |
+
}
|
grounding.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Render a question with locally retrieved, operator-authored notes."""
|
| 2 |
+
|
| 3 |
+
from runtime.reference import retrieve
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def prompt(metadata, question, hits):
|
| 7 |
+
notes = "\n\n".join(
|
| 8 |
+
f"{h['title']}\nFurther reading: {h['url']}\nEditorial summary: {h['body']}"
|
| 9 |
+
for h in hits
|
| 10 |
+
)
|
| 11 |
+
return (
|
| 12 |
+
f"Answer the {metadata['topic']} question concisely. "
|
| 13 |
+
"Use relevant information below and link the supporting reference. "
|
| 14 |
+
"These summaries are paraphrases by Hyperion Gray. Use your own words. "
|
| 15 |
+
"If the notes do not establish the answer, say what information is missing."
|
| 16 |
+
f"\n\n{notes or '(No matching notes.)'}\n\nQuestion: {question}"
|
| 17 |
+
)
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def ground(database, metadata, question):
|
| 21 |
+
return prompt(metadata, question, retrieve(database, question))
|
references.sqlite
ADDED
|
Binary file (24.6 kB). View file
|
|
|
release.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "cybermodels-linux-drivers",
|
| 3 |
+
"version": "0.1",
|
| 4 |
+
"base": "Qwen/Qwen3-Coder-Next",
|
| 5 |
+
"upstream_revision": "a7fbcb5c0e12d62a448eaa0e260346bf5dcc0feb",
|
| 6 |
+
"base_revision": "4640a0404660246e2bde9c607a1be3e47d29751f2d3753b29c65dccdb8d54051",
|
| 7 |
+
"experts_per_token": 6,
|
| 8 |
+
"training_recipe": "GPUless rank-4 lm_head",
|
| 9 |
+
"sha256": {
|
| 10 |
+
"adapter_config.json": "6c3ee1dbe41073d730d0a3fa094d9a222bbed42de0a1a5db172f0011769f0b77",
|
| 11 |
+
"adapter_model.safetensors": "afccb1ccb2cc9c40b0a4e727ea877db8b96f24df55eca8f2445aa3187c1c6c8d",
|
| 12 |
+
"specialist.json": "069da1463927a4ca3f13751a1cb09878544b08d17b126d86995a8c857857cc50",
|
| 13 |
+
"references.sqlite": "e34c0f30842208e9654831dca20689a8bcf2270a60f7045aa634942949c7b004",
|
| 14 |
+
"data/examples.jsonl": "fa52ac81cee1368077ead8ceede42c2f8a73f5d11b2519ac4396aaf0636c4829",
|
| 15 |
+
"data/train.jsonl": "d5ae309aefafa1a74491435402f1833527409e5bafc18fbdd720152b2d39082f",
|
| 16 |
+
"data/eval.jsonl": "b643a1b9ad2df680f43aa2843e3e726d58d066ef3cddba5b134b78279ffaebd0",
|
| 17 |
+
"data/specialist.toml": "b760adcd1a39bfd76ab8c11443e1ee0e039b69520ab8f79341262087d36dced8",
|
| 18 |
+
"data/sources.json": "c34b1366cdef2a31f86cc75e30971e5a13b5d4ee62ade7932b3555948bf04187",
|
| 19 |
+
"grounding.py": "22735ee3c9af7aef94b5299042bad8b44a1976ee4dc89e9b86096c18b8e3bac0",
|
| 20 |
+
"runtime/reference.py": "045d315cf5f5e9220170203c15efcb1cef27d67791e169293d085fb7711dfe78",
|
| 21 |
+
"runtime/flash_revision.py": "c9e2d3e1d83bd1c944b371fbefe7b8554546c6ed143ba278b86b0767c7db84cf",
|
| 22 |
+
"serve_specialist.py": "2253fe21d88b14379be9dc0cddbb80a9a1cd749aaf5041c5e828a88a7c7bf03b"
|
| 23 |
+
}
|
| 24 |
+
}
|
runtime/flash_revision.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Fingerprint the prepared weights and packed Flash runner used by a head adapter."""
|
| 2 |
+
|
| 3 |
+
import hashlib
|
| 4 |
+
import inspect
|
| 5 |
+
import json
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
from belikewater_transformers.lib.execution.moe_cuda_graph import Qwen3NextGraphRunner
|
| 9 |
+
from belikewater_transformers.lib.execution.moe_mxfp4_bank import MoeMxfp4Bank
|
| 10 |
+
from belikewater_transformers.models.qwennifer.flash_serving import _load_spine_model
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def packed_revision(inputs):
|
| 14 |
+
components = {
|
| 15 |
+
"source_revision": json.loads(
|
| 16 |
+
(inputs / "prepared/checkpoint.json").read_text()
|
| 17 |
+
)["source_revision"],
|
| 18 |
+
"prepared_identity": json.loads(
|
| 19 |
+
(inputs / "prepared/checkpoint.json").read_text()
|
| 20 |
+
)["identity"],
|
| 21 |
+
"packed_identity": json.loads((inputs / "packed/manifest.json").read_text())[
|
| 22 |
+
"identity"
|
| 23 |
+
],
|
| 24 |
+
"top_k": 6,
|
| 25 |
+
"pack_spine": True,
|
| 26 |
+
"runtime_sources": {
|
| 27 |
+
item.__name__: hashlib.sha256(
|
| 28 |
+
Path(inspect.getfile(item)).read_bytes()
|
| 29 |
+
).hexdigest()
|
| 30 |
+
for item in (_load_spine_model, Qwen3NextGraphRunner, MoeMxfp4Bank)
|
| 31 |
+
},
|
| 32 |
+
}
|
| 33 |
+
return hashlib.sha256(json.dumps(components, sort_keys=True).encode()).hexdigest()
|
runtime/reference.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Bounded, offline retrieval for Windows Cybermodels."""
|
| 2 |
+
|
| 3 |
+
import re
|
| 4 |
+
import sqlite3
|
| 5 |
+
from contextlib import closing
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
STOP = frozenset(
|
| 9 |
+
"""a an and are as at be by can could did do does for from how i if in is it its my of on one or
|
| 10 |
+
should tell that the their there these this to use was what when where which why will windows with would""".split()
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
def retrieve(database: Path, question: str):
|
| 15 |
+
words = dict.fromkeys(
|
| 16 |
+
t
|
| 17 |
+
for t in re.findall(r"[a-z0-9_]+", question.lower())
|
| 18 |
+
if t not in STOP and len(t) > 1
|
| 19 |
+
)
|
| 20 |
+
if not words:
|
| 21 |
+
return []
|
| 22 |
+
query = " OR ".join(f'"{term}"' for term in list(words)[:64])
|
| 23 |
+
with closing(
|
| 24 |
+
sqlite3.connect(database.resolve().as_uri() + "?mode=ro", uri=True)
|
| 25 |
+
) as db:
|
| 26 |
+
rows = db.execute(
|
| 27 |
+
"SELECT title, body, url, source FROM passages WHERE passages MATCH ? "
|
| 28 |
+
"ORDER BY bm25(passages, 3, 1, 0, 0), rowid LIMIT 10",
|
| 29 |
+
(query,),
|
| 30 |
+
)
|
| 31 |
+
hits = []
|
| 32 |
+
for title, body, url, source in rows:
|
| 33 |
+
if any(hit["id"] == source for hit in hits):
|
| 34 |
+
continue
|
| 35 |
+
hits.append(dict(id=source, title=title, body=body, url=url))
|
| 36 |
+
if len(hits) == 2:
|
| 37 |
+
break
|
| 38 |
+
return hits
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def evidence_prompt(question, hits):
|
| 42 |
+
evidence = "\n\n".join(f"[{h['title']}]({h['url']})\n{h['body']}" for h in hits)
|
| 43 |
+
return (
|
| 44 |
+
"Answer the Windows question concisely. Use the applicable reference and cite its link. "
|
| 45 |
+
"If the references do not establish the answer, identify the missing information.\n\n"
|
| 46 |
+
+ (evidence or "(No matching reference.)")
|
| 47 |
+
+ "\n\nQuestion: "
|
| 48 |
+
+ question
|
| 49 |
+
)
|
serve_specialist.py
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Serve one trained specialist with its source pack on the bounded Flash runtime."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import hashlib
|
| 5 |
+
import json
|
| 6 |
+
import os
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
import uvicorn
|
| 10 |
+
from belikewater_transformers.http_server import create_app
|
| 11 |
+
from belikewater_transformers.models.qwennifer.flash_serving import QwenniferFlashModel
|
| 12 |
+
from grounding import ground
|
| 13 |
+
from runtime.flash_revision import packed_revision
|
| 14 |
+
from safetensors.torch import load_file
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
class SpecialistFlash(QwenniferFlashModel):
|
| 18 |
+
def prepare_chat_messages(self, conversation):
|
| 19 |
+
for i in range(len(conversation) - 1, -1, -1):
|
| 20 |
+
if conversation[i]["role"] == "user":
|
| 21 |
+
messages = list(conversation)
|
| 22 |
+
messages[i] = {
|
| 23 |
+
**conversation[i],
|
| 24 |
+
"content": ground(
|
| 25 |
+
self.reference_index,
|
| 26 |
+
self.specialist,
|
| 27 |
+
conversation[i]["content"],
|
| 28 |
+
),
|
| 29 |
+
}
|
| 30 |
+
return messages
|
| 31 |
+
return conversation
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def configure_head(root):
|
| 35 |
+
weights = load_file(str(root / "adapter_model.safetensors"), device="cuda:0")
|
| 36 |
+
config = json.loads((root / "adapter_config.json").read_text())
|
| 37 |
+
a = weights["base_model.model.lm_head.lora_A.weight"]
|
| 38 |
+
b = weights["base_model.model.lm_head.lora_B.weight"]
|
| 39 |
+
active = b.any(dim=1).nonzero().flatten()
|
| 40 |
+
compact = b.index_select(0, active).T.contiguous()
|
| 41 |
+
scale = config["lora_alpha"] / config["r"]
|
| 42 |
+
|
| 43 |
+
def update(_head, inputs, output):
|
| 44 |
+
delta = ((inputs[0].float() @ a.T) @ compact) * scale
|
| 45 |
+
return output.float().index_add(-1, active, delta)
|
| 46 |
+
|
| 47 |
+
def install(model):
|
| 48 |
+
model.lm_head.register_forward_hook(update)
|
| 49 |
+
|
| 50 |
+
return install
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def serve(path):
|
| 54 |
+
cfg = json.loads(path.read_text())
|
| 55 |
+
settings = cfg["settings"]
|
| 56 |
+
root = Path(settings["assets"])
|
| 57 |
+
identity = (root / "release.json").read_bytes()
|
| 58 |
+
release = json.loads(identity)
|
| 59 |
+
inputs = Path(settings["inputs"])
|
| 60 |
+
if packed_revision(inputs) != release["base_revision"]:
|
| 61 |
+
raise ValueError(
|
| 62 |
+
"Flash checkpoint or implementation differs from the training run"
|
| 63 |
+
)
|
| 64 |
+
token = Path(cfg["token_file"]).read_text().strip()
|
| 65 |
+
if not token or os.environ.get("CUDA_VISIBLE_DEVICES") != cfg["gpus"][0]:
|
| 66 |
+
raise RuntimeError("missing worker credential or assigned GPU")
|
| 67 |
+
specialist = json.loads((root / "specialist.json").read_text())
|
| 68 |
+
model_id = specialist["model"]
|
| 69 |
+
model = SpecialistFlash(
|
| 70 |
+
inputs_dir=inputs,
|
| 71 |
+
flat_cache=Path(settings["flat_cache"]),
|
| 72 |
+
hot_experts_file=Path(settings["hot_experts_file"]),
|
| 73 |
+
map_flat_cache=True,
|
| 74 |
+
cache_slots=settings["cache_slots"],
|
| 75 |
+
max_context_tokens=settings["max_context_tokens"],
|
| 76 |
+
prefill_chunk_tokens=1024,
|
| 77 |
+
configure_head=configure_head(root),
|
| 78 |
+
aliases=(model_id,),
|
| 79 |
+
routing_family=model_id,
|
| 80 |
+
compatibility_sha256=hashlib.sha256(identity).hexdigest(),
|
| 81 |
+
)
|
| 82 |
+
model.specialist = specialist
|
| 83 |
+
model.reference_index = root / "references.sqlite"
|
| 84 |
+
app = create_app(
|
| 85 |
+
model=model,
|
| 86 |
+
api_key=token,
|
| 87 |
+
max_queue_size=12,
|
| 88 |
+
prompt_lookup_tokens=0,
|
| 89 |
+
usage_role="primary",
|
| 90 |
+
close_supplied_model=True,
|
| 91 |
+
)
|
| 92 |
+
uvicorn.run(app, host=settings["host"], port=settings["port"], workers=1)
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
if __name__ == "__main__":
|
| 96 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 97 |
+
parser.add_argument("--config", type=Path, required=True)
|
| 98 |
+
serve(parser.parse_args().config)
|
specialist.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "cybermodels-linux-drivers",
|
| 3 |
+
"topic": "Linux driver maintenance",
|
| 4 |
+
"summary": "Driver resource lifetime, DMA ownership, device binding and power management in Linux 6.12."
|
| 5 |
+
}
|
training/capture.py
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Teacher-force complete answers on an offline copy of the admitted packed Flash."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import hashlib
|
| 5 |
+
import inspect
|
| 6 |
+
import json
|
| 7 |
+
from collections import Counter
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
|
| 10 |
+
import numpy as np
|
| 11 |
+
import torch
|
| 12 |
+
from belikewater_transformers.models.qwennifer.flash_serving import (
|
| 13 |
+
QwenniferFlashModel,
|
| 14 |
+
)
|
| 15 |
+
from flash_revision import packed_revision
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def load(settings):
|
| 19 |
+
cfg = json.loads(settings.read_text())
|
| 20 |
+
inputs = Path(cfg["inputs"])
|
| 21 |
+
bank, hot = Path(cfg["flat_cache"]), Path(cfg["hot_experts_file"])
|
| 22 |
+
if not bank.is_file() or not hot.is_file():
|
| 23 |
+
msg = "expected existing Flash assets"
|
| 24 |
+
raise FileNotFoundError(msg)
|
| 25 |
+
flash = QwenniferFlashModel(
|
| 26 |
+
inputs_dir=inputs,
|
| 27 |
+
flat_cache=bank,
|
| 28 |
+
hot_experts_file=hot,
|
| 29 |
+
cache_slots=cfg.get("capture_cache_slots", 9000),
|
| 30 |
+
**({"map_flat_cache": True} if cfg.get("map_flat_cache") else {}),
|
| 31 |
+
max_context_tokens=1024,
|
| 32 |
+
prefill_chunk_tokens=1024,
|
| 33 |
+
)
|
| 34 |
+
return flash, packed_revision(inputs)
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def prompt_ids(tok, row):
|
| 38 |
+
text = tok.apply_chat_template(
|
| 39 |
+
[{"role": "user", "content": row["prompt"]}],
|
| 40 |
+
tokenize=False,
|
| 41 |
+
add_generation_prompt=True,
|
| 42 |
+
)
|
| 43 |
+
return tok.encode(text, add_special_tokens=False)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def name(row):
|
| 47 |
+
return row["id"] + "-" + row["condition"]
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def capture_sequence(flash, ids):
|
| 51 |
+
# The frozen runner hands its final norm only the last position. For a
|
| 52 |
+
# single chunk the same activation tensor already contains every position.
|
| 53 |
+
# Inspect only that one call, without changing serving or recomputing layers.
|
| 54 |
+
runner = flash.runner
|
| 55 |
+
found = []
|
| 56 |
+
code = inspect.unwrap(type(runner).prefill).__code__
|
| 57 |
+
|
| 58 |
+
def collect(_module, args):
|
| 59 |
+
frame = inspect.currentframe().f_back
|
| 60 |
+
while frame is not None and frame.f_code is not code:
|
| 61 |
+
frame = frame.f_back
|
| 62 |
+
if frame is None:
|
| 63 |
+
msg = "unrecognized Flash prefill call"
|
| 64 |
+
raise RuntimeError(msg)
|
| 65 |
+
all_hidden = frame.f_locals["hs"]
|
| 66 |
+
if (
|
| 67 |
+
all_hidden.shape[1] != len(ids)
|
| 68 |
+
or all_hidden[:, -1:].data_ptr() != args[0].data_ptr()
|
| 69 |
+
):
|
| 70 |
+
msg = "expected last position of a single prefill chunk"
|
| 71 |
+
raise RuntimeError(msg)
|
| 72 |
+
found.append(all_hidden)
|
| 73 |
+
|
| 74 |
+
with flash.model.model.norm.register_forward_pre_hook(collect):
|
| 75 |
+
last = runner.prefill(torch.tensor([ids], device=flash.device))
|
| 76 |
+
(hs,) = found
|
| 77 |
+
return hs, last
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
@torch.inference_mode()
|
| 81 |
+
def capture(settings, dataset, directory):
|
| 82 |
+
directory.mkdir(exist_ok=False)
|
| 83 |
+
flash, revision = load(settings)
|
| 84 |
+
rows = [json.loads(x) for x in dataset.read_text().splitlines()]
|
| 85 |
+
tok = flash.tokenizer
|
| 86 |
+
answers = [
|
| 87 |
+
[*tok.encode(r["answer"], add_special_tokens=False), tok.eos_token_id]
|
| 88 |
+
for r in rows
|
| 89 |
+
]
|
| 90 |
+
freq = Counter(
|
| 91 |
+
t
|
| 92 |
+
for r, ids in zip(rows, answers, strict=True)
|
| 93 |
+
if r["split"] == "train"
|
| 94 |
+
for t in ids
|
| 95 |
+
)
|
| 96 |
+
vocab = sorted(
|
| 97 |
+
k for k, _ in sorted(freq.items(), key=lambda kv: (-kv[1], kv[0]))[:256]
|
| 98 |
+
)
|
| 99 |
+
select = torch.tensor(vocab, device=flash.device)
|
| 100 |
+
meta = {
|
| 101 |
+
"model": "qwennifer-flash",
|
| 102 |
+
"revision": revision,
|
| 103 |
+
"rows": vocab,
|
| 104 |
+
"gpu": torch.cuda.get_device_name(),
|
| 105 |
+
"dataset_sha256": hashlib.sha256(dataset.read_bytes()).hexdigest(),
|
| 106 |
+
}
|
| 107 |
+
for i, (r, answer) in enumerate(zip(rows, answers, strict=True)):
|
| 108 |
+
prefix = prompt_ids(tok, r)
|
| 109 |
+
ids = prefix + answer[:-1]
|
| 110 |
+
if len(ids) > flash.max_context_tokens:
|
| 111 |
+
msg = "supervised prompt exceeds offline capture budget"
|
| 112 |
+
raise ValueError(msg)
|
| 113 |
+
hs, last = capture_sequence(flash, ids)
|
| 114 |
+
h = flash.model.model.norm(hs[:, len(prefix) - 1 :, :]).squeeze(0)
|
| 115 |
+
scores = flash.model.lm_head(h.unsqueeze(0)).squeeze(0).float()
|
| 116 |
+
y = torch.tensor(answer, device=flash.device)
|
| 117 |
+
top = scores.argmax(1)
|
| 118 |
+
if i == 0:
|
| 119 |
+
independent = flash.runner.prefill(
|
| 120 |
+
torch.tensor([prefix], device=flash.device)
|
| 121 |
+
)
|
| 122 |
+
control = {
|
| 123 |
+
"prompt_only_top1": independent,
|
| 124 |
+
"teacher_forced_first_top1": top[0].item(),
|
| 125 |
+
"stock_last_top1": last,
|
| 126 |
+
"captured_last_top1": top[-1].item(),
|
| 127 |
+
}
|
| 128 |
+
if independent != top[0].item() or last != top[-1].item():
|
| 129 |
+
msg = f"causal/alignment control disagrees: {control}"
|
| 130 |
+
raise RuntimeError(msg)
|
| 131 |
+
meta.update(control=control, vocabulary=scores.shape[1])
|
| 132 |
+
(directory / "meta.json").write_text(json.dumps(meta))
|
| 133 |
+
selected = scores[:, select]
|
| 134 |
+
label = scores.gather(1, y[:, None]).squeeze(1)
|
| 135 |
+
scores[:, select] = -torch.inf
|
| 136 |
+
outside_max, outside_id = scores.max(1)
|
| 137 |
+
|
| 138 |
+
def array(x):
|
| 139 |
+
return x.cpu().numpy()
|
| 140 |
+
|
| 141 |
+
np.savez(
|
| 142 |
+
directory / (name(r) + ".npz"),
|
| 143 |
+
h=array(h.half()),
|
| 144 |
+
y=array(y),
|
| 145 |
+
selected=array(selected),
|
| 146 |
+
label=array(label),
|
| 147 |
+
outside_lse=array(scores.logsumexp(1)),
|
| 148 |
+
outside_max=array(outside_max),
|
| 149 |
+
outside_id=array(outside_id),
|
| 150 |
+
)
|
| 151 |
+
if i % 20 == 0 or i + 1 == len(rows):
|
| 152 |
+
print(f"{i + 1}/{len(rows)} complete", flush=True)
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
if __name__ == "__main__":
|
| 156 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 157 |
+
for arg in ("settings", "dataset", "directory"):
|
| 158 |
+
parser.add_argument(arg, type=Path)
|
| 159 |
+
args = parser.parse_args()
|
| 160 |
+
capture(args.settings, args.dataset, args.directory)
|
training/fit.py
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Train a rank-four GPUless head on whole Windows Internals reference answers."""
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import hashlib
|
| 5 |
+
import json
|
| 6 |
+
import time
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
import numpy as np
|
| 10 |
+
import torch
|
| 11 |
+
from gpuless_native_bridge import NativeLibrary, NativeSession
|
| 12 |
+
from gpuless_peft_export import export_peft
|
| 13 |
+
from safetensors.numpy import load_file
|
| 14 |
+
from subspace import CompactObjective, expand
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def load_features(directory, examples):
|
| 18 |
+
parts = []
|
| 19 |
+
starts, lengths = [], []
|
| 20 |
+
offset = 0
|
| 21 |
+
for row in examples:
|
| 22 |
+
path = directory / (row["id"] + "-" + row["condition"] + ".npz")
|
| 23 |
+
with np.load(path, allow_pickle=False) as data:
|
| 24 |
+
values = {k: data[k] for k in data}
|
| 25 |
+
parts.append(values)
|
| 26 |
+
starts.append(offset)
|
| 27 |
+
lengths.append(len(values["y"]))
|
| 28 |
+
offset += lengths[-1]
|
| 29 |
+
values = {k: np.concatenate([part[k] for part in parts]) for k in parts[0]}
|
| 30 |
+
return values, np.array(starts), np.array(lengths)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def basis_for(hidden):
|
| 34 |
+
torch.manual_seed(341)
|
| 35 |
+
h = torch.from_numpy(hidden.astype(np.float32))
|
| 36 |
+
_, _, v = torch.pca_lowrank(h, q=32, center=False, niter=3)
|
| 37 |
+
b = v[:, :24].T.contiguous()
|
| 38 |
+
rms = (h @ b.T).square().mean(0).sqrt().clamp_min(1e-5)
|
| 39 |
+
return (b / rms[:, None]).numpy().copy()
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def dataset_entry(data, rows, basis):
|
| 43 |
+
selected = data["selected"]
|
| 44 |
+
lse = np.logaddexp(data["outside_lse"], np.logaddexp.reduce(selected, axis=1))
|
| 45 |
+
indices = {token: i for i, token in enumerate(rows.tolist())}
|
| 46 |
+
return {
|
| 47 |
+
"hidden": np.ascontiguousarray(data["h"].astype(np.float32) @ basis.T),
|
| 48 |
+
"selected": selected,
|
| 49 |
+
"outside_lse": data["outside_lse"],
|
| 50 |
+
"base_lse": lse,
|
| 51 |
+
"reference_p": np.exp(selected - lse[:, None]),
|
| 52 |
+
"label_base": data["label"],
|
| 53 |
+
"label_indices": np.array([indices.get(int(t), -1) for t in data["y"]]),
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def score(data, rows, delta):
|
| 58 |
+
logits = data["selected"] + delta
|
| 59 |
+
denom = np.logaddexp(data["outside_lse"], np.logaddexp.reduce(logits, axis=1))
|
| 60 |
+
cols = np.searchsorted(rows, data["y"]).clip(max=len(rows) - 1)
|
| 61 |
+
targets = data["label"] + delta[np.arange(len(cols)), cols] * (
|
| 62 |
+
rows[cols] == data["y"]
|
| 63 |
+
)
|
| 64 |
+
peak = logits.argmax(1)
|
| 65 |
+
best = logits[np.arange(len(peak)), peak]
|
| 66 |
+
use_selected = (best > data["outside_max"]) | (
|
| 67 |
+
(best == data["outside_max"]) & (rows[peak] < data["outside_id"])
|
| 68 |
+
)
|
| 69 |
+
winner = np.where(
|
| 70 |
+
use_selected,
|
| 71 |
+
rows[peak],
|
| 72 |
+
data["outside_id"],
|
| 73 |
+
)
|
| 74 |
+
return denom - targets, winner == data["y"]
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def fit(features, dataset, out):
|
| 78 |
+
meta = json.loads((features / "meta.json").read_text())
|
| 79 |
+
if meta["dataset_sha256"] != hashlib.sha256(dataset.read_bytes()).hexdigest():
|
| 80 |
+
msg = "capture belongs to another dataset"
|
| 81 |
+
raise ValueError(msg)
|
| 82 |
+
examples = [json.loads(x) for x in dataset.read_text().splitlines()]
|
| 83 |
+
data, starts, lengths = load_features(features, examples)
|
| 84 |
+
train = np.array([i for i, r in enumerate(examples) if r["split"] == "train"])
|
| 85 |
+
held = {r["passage"] for r in examples if r["split"] == "test"}
|
| 86 |
+
if held & {examples[i]["passage"] for i in train}:
|
| 87 |
+
msg = "passage leaked across the split"
|
| 88 |
+
raise ValueError(msg)
|
| 89 |
+
train_positions = np.concatenate(
|
| 90 |
+
[np.arange(starts[i], starts[i] + lengths[i]) for i in train]
|
| 91 |
+
)
|
| 92 |
+
basis = basis_for(data["h"][train_positions])
|
| 93 |
+
rows = np.array(meta["rows"])
|
| 94 |
+
rank = 4
|
| 95 |
+
out.mkdir(exist_ok=False, parents=True)
|
| 96 |
+
obj = CompactObjective(basis=basis, rows=rows, rank=rank, alpha=rank)
|
| 97 |
+
obj.active = "batch"
|
| 98 |
+
entry = dataset_entry(data, rows, basis)
|
| 99 |
+
rng = np.random.default_rng(20261126)
|
| 100 |
+
initial_a = rng.normal(0, len(basis) ** -0.5, size=(rank, len(basis))).astype(
|
| 101 |
+
np.float32
|
| 102 |
+
)
|
| 103 |
+
config = {
|
| 104 |
+
"library": NativeLibrary(),
|
| 105 |
+
"model_id": meta["model"],
|
| 106 |
+
"model_revision": meta["revision"],
|
| 107 |
+
"rank": rank,
|
| 108 |
+
"alpha": rank,
|
| 109 |
+
"learning_rate": 0.008,
|
| 110 |
+
"seed": 342,
|
| 111 |
+
}
|
| 112 |
+
try:
|
| 113 |
+
with NativeSession(
|
| 114 |
+
**config,
|
| 115 |
+
target_name="lm_head.compact",
|
| 116 |
+
in_features=len(basis),
|
| 117 |
+
out_features=len(rows),
|
| 118 |
+
initial_a=initial_a,
|
| 119 |
+
initial_b=np.zeros((len(rows), rank), np.float32),
|
| 120 |
+
loss_callback=obj.callback,
|
| 121 |
+
) as session:
|
| 122 |
+
t = time.monotonic()
|
| 123 |
+
for _epoch in range(32):
|
| 124 |
+
order = rng.permutation(train)
|
| 125 |
+
for start in range(0, len(order), 16):
|
| 126 |
+
ids = order[start : start + 16]
|
| 127 |
+
# Same minibatch for all +/- measurements in the native step.
|
| 128 |
+
pos = (
|
| 129 |
+
starts[ids, None]
|
| 130 |
+
+ rng.integers(0, lengths[ids, None], (len(ids), 8))
|
| 131 |
+
).ravel()
|
| 132 |
+
obj.entries["batch"] = {k: v[pos] for k, v in entry.items()}
|
| 133 |
+
session.step(identity="batch", examples=len(ids), directions=4)
|
| 134 |
+
elapsed = time.monotonic() - t
|
| 135 |
+
a, b, generation = session.copy_adapter()
|
| 136 |
+
session.save_checkpoint(out / "compact.checkpoint")
|
| 137 |
+
np.savez(out / "space.npz", basis=basis, rows=rows)
|
| 138 |
+
full_a, full_b = expand(a, b, basis, rows, meta["vocabulary"])
|
| 139 |
+
|
| 140 |
+
def export_only(_request):
|
| 141 |
+
msg = "expanded session is serialization only"
|
| 142 |
+
raise RuntimeError(msg)
|
| 143 |
+
|
| 144 |
+
with NativeSession(
|
| 145 |
+
**config,
|
| 146 |
+
target_name="lm_head",
|
| 147 |
+
in_features=full_a.shape[1],
|
| 148 |
+
out_features=full_b.shape[0],
|
| 149 |
+
initial_a=full_a,
|
| 150 |
+
initial_b=full_b,
|
| 151 |
+
loss_callback=export_only,
|
| 152 |
+
) as expanded:
|
| 153 |
+
expanded.export_adapter(out / "lm_head.gpuless")
|
| 154 |
+
export_peft(
|
| 155 |
+
out / "lm_head.gpuless",
|
| 156 |
+
out / "peft",
|
| 157 |
+
expected_model_id=meta["model"],
|
| 158 |
+
expected_revision=meta["revision"],
|
| 159 |
+
base_model=meta["model"],
|
| 160 |
+
base_revision=meta["revision"],
|
| 161 |
+
)
|
| 162 |
+
weights = load_file(str(out / "peft/adapter_model.safetensors"))
|
| 163 |
+
delta = (
|
| 164 |
+
data["h"].astype(np.float32)
|
| 165 |
+
@ weights["base_model.model.lm_head.lora_A.weight"].T
|
| 166 |
+
) @ weights["base_model.model.lm_head.lora_B.weight"][rows].T
|
| 167 |
+
np.testing.assert_allclose(
|
| 168 |
+
delta[:128],
|
| 169 |
+
obj.ptpu.add(
|
| 170 |
+
a, b, entry["hidden"][:128], np.zeros((128, len(rows)), np.float32)
|
| 171 |
+
),
|
| 172 |
+
rtol=2e-4,
|
| 173 |
+
atol=2e-4,
|
| 174 |
+
)
|
| 175 |
+
pairs = {
|
| 176 |
+
key: score(data, rows, d)
|
| 177 |
+
for key, d in (("flash", np.zeros_like(delta)), ("lora", delta))
|
| 178 |
+
}
|
| 179 |
+
scores, per_question = {}, []
|
| 180 |
+
for i, r in enumerate(examples):
|
| 181 |
+
sel = slice(starts[i], starts[i] + lengths[i])
|
| 182 |
+
rec = {k: r[k] for k in ("id", "split", "condition", "passage")}
|
| 183 |
+
for key, (nll, acc) in pairs.items():
|
| 184 |
+
rec[key] = {
|
| 185 |
+
"mean_nll": float(nll[sel].mean()),
|
| 186 |
+
"correct": int(acc[sel].sum()),
|
| 187 |
+
}
|
| 188 |
+
rec["tokens"] = int(lengths[i])
|
| 189 |
+
per_question.append(rec)
|
| 190 |
+
for split, condition in sorted(
|
| 191 |
+
{(r["split"], r["condition"]) for r in examples}
|
| 192 |
+
):
|
| 193 |
+
group = [
|
| 194 |
+
r
|
| 195 |
+
for r in per_question
|
| 196 |
+
if (r["split"], r["condition"]) == (split, condition)
|
| 197 |
+
]
|
| 198 |
+
total = sum(r["tokens"] for r in group)
|
| 199 |
+
scores[split + "-" + condition] = {
|
| 200 |
+
"questions": len(group),
|
| 201 |
+
"tokens": total,
|
| 202 |
+
**{
|
| 203 |
+
key: {
|
| 204 |
+
"nll": sum(r[key]["mean_nll"] * r["tokens"] for r in group)
|
| 205 |
+
/ total,
|
| 206 |
+
"top1": sum(r[key]["correct"] for r in group) / total,
|
| 207 |
+
}
|
| 208 |
+
for key in pairs
|
| 209 |
+
},
|
| 210 |
+
}
|
| 211 |
+
report = {
|
| 212 |
+
"model_revision": meta["revision"],
|
| 213 |
+
"capture_control": meta["control"],
|
| 214 |
+
"optimizer": "GPUless native MeZO + pTPU",
|
| 215 |
+
"rank": rank,
|
| 216 |
+
"vocabulary_rows": len(rows),
|
| 217 |
+
"basis_dimensions": len(basis),
|
| 218 |
+
"steps": generation,
|
| 219 |
+
"directions": 4,
|
| 220 |
+
"train_seconds": elapsed,
|
| 221 |
+
"dataset_sha256": meta["dataset_sha256"],
|
| 222 |
+
"scores": scores,
|
| 223 |
+
}
|
| 224 |
+
(out / "scores.json").write_text(json.dumps(report, indent=2) + "\n")
|
| 225 |
+
(out / "question_scores.json").write_text(
|
| 226 |
+
json.dumps(per_question, indent=2) + "\n"
|
| 227 |
+
)
|
| 228 |
+
print(json.dumps(report))
|
| 229 |
+
finally:
|
| 230 |
+
obj.close()
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
if __name__ == "__main__":
|
| 234 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 235 |
+
for arg in ("features", "dataset", "out"):
|
| 236 |
+
parser.add_argument(arg, type=Path)
|
| 237 |
+
args = parser.parse_args()
|
| 238 |
+
torch.set_num_threads(2)
|
| 239 |
+
fit(args.features, args.dataset, args.out)
|
training/flash_revision.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Fingerprint the prepared weights and packed Flash runner used by a head adapter."""
|
| 2 |
+
|
| 3 |
+
import hashlib
|
| 4 |
+
import inspect
|
| 5 |
+
import json
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
from belikewater_transformers.lib.execution.moe_cuda_graph import Qwen3NextGraphRunner
|
| 9 |
+
from belikewater_transformers.lib.execution.moe_mxfp4_bank import MoeMxfp4Bank
|
| 10 |
+
from belikewater_transformers.models.qwennifer.flash_serving import _load_spine_model
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def packed_revision(inputs):
|
| 14 |
+
components = {
|
| 15 |
+
"source_revision": json.loads(
|
| 16 |
+
(inputs / "prepared/checkpoint.json").read_text()
|
| 17 |
+
)["source_revision"],
|
| 18 |
+
"prepared_identity": json.loads(
|
| 19 |
+
(inputs / "prepared/checkpoint.json").read_text()
|
| 20 |
+
)["identity"],
|
| 21 |
+
"packed_identity": json.loads((inputs / "packed/manifest.json").read_text())[
|
| 22 |
+
"identity"
|
| 23 |
+
],
|
| 24 |
+
"top_k": 6,
|
| 25 |
+
"pack_spine": True,
|
| 26 |
+
"runtime_sources": {
|
| 27 |
+
item.__name__: hashlib.sha256(
|
| 28 |
+
Path(inspect.getfile(item)).read_bytes()
|
| 29 |
+
).hexdigest()
|
| 30 |
+
for item in (_load_spine_model, Qwen3NextGraphRunner, MoeMxfp4Bank)
|
| 31 |
+
},
|
| 32 |
+
}
|
| 33 |
+
return hashlib.sha256(json.dumps(components, sort_keys=True).encode()).hexdigest()
|
training/question_scores.json
ADDED
|
@@ -0,0 +1,752 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"id": "e46bf54e6efef4fe",
|
| 4 |
+
"split": "train",
|
| 5 |
+
"condition": "closed",
|
| 6 |
+
"passage": "devres",
|
| 7 |
+
"flash": {
|
| 8 |
+
"mean_nll": 4.4539794921875,
|
| 9 |
+
"correct": 8
|
| 10 |
+
},
|
| 11 |
+
"lora": {
|
| 12 |
+
"mean_nll": 4.285741806030273,
|
| 13 |
+
"correct": 8
|
| 14 |
+
},
|
| 15 |
+
"tokens": 21
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"id": "e46bf54e6efef4fe",
|
| 19 |
+
"split": "train",
|
| 20 |
+
"condition": "rag",
|
| 21 |
+
"passage": "devres",
|
| 22 |
+
"flash": {
|
| 23 |
+
"mean_nll": 2.2294163703918457,
|
| 24 |
+
"correct": 30
|
| 25 |
+
},
|
| 26 |
+
"lora": {
|
| 27 |
+
"mean_nll": 2.151560068130493,
|
| 28 |
+
"correct": 30
|
| 29 |
+
},
|
| 30 |
+
"tokens": 46
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"id": "77a8764dda4af95f",
|
| 34 |
+
"split": "train",
|
| 35 |
+
"condition": "closed",
|
| 36 |
+
"passage": "devres",
|
| 37 |
+
"flash": {
|
| 38 |
+
"mean_nll": 4.357283115386963,
|
| 39 |
+
"correct": 2
|
| 40 |
+
},
|
| 41 |
+
"lora": {
|
| 42 |
+
"mean_nll": 4.208845138549805,
|
| 43 |
+
"correct": 2
|
| 44 |
+
},
|
| 45 |
+
"tokens": 17
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"id": "77a8764dda4af95f",
|
| 49 |
+
"split": "train",
|
| 50 |
+
"condition": "rag",
|
| 51 |
+
"passage": "devres",
|
| 52 |
+
"flash": {
|
| 53 |
+
"mean_nll": 1.737013339996338,
|
| 54 |
+
"correct": 29
|
| 55 |
+
},
|
| 56 |
+
"lora": {
|
| 57 |
+
"mean_nll": 1.657729148864746,
|
| 58 |
+
"correct": 29
|
| 59 |
+
},
|
| 60 |
+
"tokens": 42
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"id": "5038bc9da8d40bfd",
|
| 64 |
+
"split": "train",
|
| 65 |
+
"condition": "closed",
|
| 66 |
+
"passage": "devres",
|
| 67 |
+
"flash": {
|
| 68 |
+
"mean_nll": 4.141846179962158,
|
| 69 |
+
"correct": 5
|
| 70 |
+
},
|
| 71 |
+
"lora": {
|
| 72 |
+
"mean_nll": 4.032387733459473,
|
| 73 |
+
"correct": 5
|
| 74 |
+
},
|
| 75 |
+
"tokens": 16
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"id": "5038bc9da8d40bfd",
|
| 79 |
+
"split": "train",
|
| 80 |
+
"condition": "rag",
|
| 81 |
+
"passage": "devres",
|
| 82 |
+
"flash": {
|
| 83 |
+
"mean_nll": 2.159350872039795,
|
| 84 |
+
"correct": 27
|
| 85 |
+
},
|
| 86 |
+
"lora": {
|
| 87 |
+
"mean_nll": 2.083460569381714,
|
| 88 |
+
"correct": 28
|
| 89 |
+
},
|
| 90 |
+
"tokens": 41
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"id": "7df0dd120417c3a3",
|
| 94 |
+
"split": "train",
|
| 95 |
+
"condition": "closed",
|
| 96 |
+
"passage": "dma",
|
| 97 |
+
"flash": {
|
| 98 |
+
"mean_nll": 4.052240371704102,
|
| 99 |
+
"correct": 7
|
| 100 |
+
},
|
| 101 |
+
"lora": {
|
| 102 |
+
"mean_nll": 3.921247720718384,
|
| 103 |
+
"correct": 8
|
| 104 |
+
},
|
| 105 |
+
"tokens": 18
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"id": "7df0dd120417c3a3",
|
| 109 |
+
"split": "train",
|
| 110 |
+
"condition": "rag",
|
| 111 |
+
"passage": "dma",
|
| 112 |
+
"flash": {
|
| 113 |
+
"mean_nll": 2.2345130443573,
|
| 114 |
+
"correct": 30
|
| 115 |
+
},
|
| 116 |
+
"lora": {
|
| 117 |
+
"mean_nll": 2.1367344856262207,
|
| 118 |
+
"correct": 31
|
| 119 |
+
},
|
| 120 |
+
"tokens": 45
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
"id": "bf3275d4cb4e5e1b",
|
| 124 |
+
"split": "train",
|
| 125 |
+
"condition": "closed",
|
| 126 |
+
"passage": "dma",
|
| 127 |
+
"flash": {
|
| 128 |
+
"mean_nll": 2.9337077140808105,
|
| 129 |
+
"correct": 7
|
| 130 |
+
},
|
| 131 |
+
"lora": {
|
| 132 |
+
"mean_nll": 2.8094146251678467,
|
| 133 |
+
"correct": 7
|
| 134 |
+
},
|
| 135 |
+
"tokens": 16
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"id": "bf3275d4cb4e5e1b",
|
| 139 |
+
"split": "train",
|
| 140 |
+
"condition": "rag",
|
| 141 |
+
"passage": "dma",
|
| 142 |
+
"flash": {
|
| 143 |
+
"mean_nll": 1.7013084888458252,
|
| 144 |
+
"correct": 32
|
| 145 |
+
},
|
| 146 |
+
"lora": {
|
| 147 |
+
"mean_nll": 1.6327128410339355,
|
| 148 |
+
"correct": 32
|
| 149 |
+
},
|
| 150 |
+
"tokens": 43
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"id": "bd16f5666843c414",
|
| 154 |
+
"split": "train",
|
| 155 |
+
"condition": "closed",
|
| 156 |
+
"passage": "dma",
|
| 157 |
+
"flash": {
|
| 158 |
+
"mean_nll": 4.9038519859313965,
|
| 159 |
+
"correct": 6
|
| 160 |
+
},
|
| 161 |
+
"lora": {
|
| 162 |
+
"mean_nll": 4.857196807861328,
|
| 163 |
+
"correct": 6
|
| 164 |
+
},
|
| 165 |
+
"tokens": 17
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"id": "bd16f5666843c414",
|
| 169 |
+
"split": "train",
|
| 170 |
+
"condition": "rag",
|
| 171 |
+
"passage": "dma",
|
| 172 |
+
"flash": {
|
| 173 |
+
"mean_nll": 2.6822309494018555,
|
| 174 |
+
"correct": 30
|
| 175 |
+
},
|
| 176 |
+
"lora": {
|
| 177 |
+
"mean_nll": 2.6136348247528076,
|
| 178 |
+
"correct": 31
|
| 179 |
+
},
|
| 180 |
+
"tokens": 44
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"id": "5e56a28a26878863",
|
| 184 |
+
"split": "train",
|
| 185 |
+
"condition": "closed",
|
| 186 |
+
"passage": "binding",
|
| 187 |
+
"flash": {
|
| 188 |
+
"mean_nll": 5.155674934387207,
|
| 189 |
+
"correct": 8
|
| 190 |
+
},
|
| 191 |
+
"lora": {
|
| 192 |
+
"mean_nll": 5.015802383422852,
|
| 193 |
+
"correct": 7
|
| 194 |
+
},
|
| 195 |
+
"tokens": 19
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"id": "5e56a28a26878863",
|
| 199 |
+
"split": "train",
|
| 200 |
+
"condition": "rag",
|
| 201 |
+
"passage": "binding",
|
| 202 |
+
"flash": {
|
| 203 |
+
"mean_nll": 5.689993381500244,
|
| 204 |
+
"correct": 5
|
| 205 |
+
},
|
| 206 |
+
"lora": {
|
| 207 |
+
"mean_nll": 5.6190056800842285,
|
| 208 |
+
"correct": 5
|
| 209 |
+
},
|
| 210 |
+
"tokens": 19
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"id": "b19d23070e31bfd4",
|
| 214 |
+
"split": "train",
|
| 215 |
+
"condition": "closed",
|
| 216 |
+
"passage": "binding",
|
| 217 |
+
"flash": {
|
| 218 |
+
"mean_nll": 3.05606746673584,
|
| 219 |
+
"correct": 11
|
| 220 |
+
},
|
| 221 |
+
"lora": {
|
| 222 |
+
"mean_nll": 3.05133056640625,
|
| 223 |
+
"correct": 11
|
| 224 |
+
},
|
| 225 |
+
"tokens": 18
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"id": "b19d23070e31bfd4",
|
| 229 |
+
"split": "train",
|
| 230 |
+
"condition": "rag",
|
| 231 |
+
"passage": "binding",
|
| 232 |
+
"flash": {
|
| 233 |
+
"mean_nll": 1.7513740062713623,
|
| 234 |
+
"correct": 31
|
| 235 |
+
},
|
| 236 |
+
"lora": {
|
| 237 |
+
"mean_nll": 1.7104018926620483,
|
| 238 |
+
"correct": 32
|
| 239 |
+
},
|
| 240 |
+
"tokens": 44
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"id": "d04f76a8c142c12e",
|
| 244 |
+
"split": "train",
|
| 245 |
+
"condition": "closed",
|
| 246 |
+
"passage": "binding",
|
| 247 |
+
"flash": {
|
| 248 |
+
"mean_nll": 5.248671054840088,
|
| 249 |
+
"correct": 3
|
| 250 |
+
},
|
| 251 |
+
"lora": {
|
| 252 |
+
"mean_nll": 4.991214752197266,
|
| 253 |
+
"correct": 4
|
| 254 |
+
},
|
| 255 |
+
"tokens": 21
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"id": "d04f76a8c142c12e",
|
| 259 |
+
"split": "train",
|
| 260 |
+
"condition": "rag",
|
| 261 |
+
"passage": "binding",
|
| 262 |
+
"flash": {
|
| 263 |
+
"mean_nll": 2.7240166664123535,
|
| 264 |
+
"correct": 29
|
| 265 |
+
},
|
| 266 |
+
"lora": {
|
| 267 |
+
"mean_nll": 2.590496063232422,
|
| 268 |
+
"correct": 30
|
| 269 |
+
},
|
| 270 |
+
"tokens": 47
|
| 271 |
+
},
|
| 272 |
+
{
|
| 273 |
+
"id": "017682e145d8af46",
|
| 274 |
+
"split": "train",
|
| 275 |
+
"condition": "closed",
|
| 276 |
+
"passage": "sysfs",
|
| 277 |
+
"flash": {
|
| 278 |
+
"mean_nll": 3.9900059700012207,
|
| 279 |
+
"correct": 7
|
| 280 |
+
},
|
| 281 |
+
"lora": {
|
| 282 |
+
"mean_nll": 3.910372257232666,
|
| 283 |
+
"correct": 8
|
| 284 |
+
},
|
| 285 |
+
"tokens": 16
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"id": "017682e145d8af46",
|
| 289 |
+
"split": "train",
|
| 290 |
+
"condition": "rag",
|
| 291 |
+
"passage": "sysfs",
|
| 292 |
+
"flash": {
|
| 293 |
+
"mean_nll": 1.5686523914337158,
|
| 294 |
+
"correct": 29
|
| 295 |
+
},
|
| 296 |
+
"lora": {
|
| 297 |
+
"mean_nll": 1.5107827186584473,
|
| 298 |
+
"correct": 29
|
| 299 |
+
},
|
| 300 |
+
"tokens": 38
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"id": "28c3145e87a69ff4",
|
| 304 |
+
"split": "train",
|
| 305 |
+
"condition": "closed",
|
| 306 |
+
"passage": "sysfs",
|
| 307 |
+
"flash": {
|
| 308 |
+
"mean_nll": 4.403927803039551,
|
| 309 |
+
"correct": 6
|
| 310 |
+
},
|
| 311 |
+
"lora": {
|
| 312 |
+
"mean_nll": 4.250773906707764,
|
| 313 |
+
"correct": 7
|
| 314 |
+
},
|
| 315 |
+
"tokens": 22
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"id": "28c3145e87a69ff4",
|
| 319 |
+
"split": "train",
|
| 320 |
+
"condition": "rag",
|
| 321 |
+
"passage": "sysfs",
|
| 322 |
+
"flash": {
|
| 323 |
+
"mean_nll": 2.643022298812866,
|
| 324 |
+
"correct": 28
|
| 325 |
+
},
|
| 326 |
+
"lora": {
|
| 327 |
+
"mean_nll": 2.539874792098999,
|
| 328 |
+
"correct": 29
|
| 329 |
+
},
|
| 330 |
+
"tokens": 44
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"id": "f555badcda924a37",
|
| 334 |
+
"split": "train",
|
| 335 |
+
"condition": "closed",
|
| 336 |
+
"passage": "sysfs",
|
| 337 |
+
"flash": {
|
| 338 |
+
"mean_nll": 6.312275409698486,
|
| 339 |
+
"correct": 4
|
| 340 |
+
},
|
| 341 |
+
"lora": {
|
| 342 |
+
"mean_nll": 6.0518693923950195,
|
| 343 |
+
"correct": 4
|
| 344 |
+
},
|
| 345 |
+
"tokens": 14
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"id": "f555badcda924a37",
|
| 349 |
+
"split": "train",
|
| 350 |
+
"condition": "rag",
|
| 351 |
+
"passage": "sysfs",
|
| 352 |
+
"flash": {
|
| 353 |
+
"mean_nll": 2.8802902698516846,
|
| 354 |
+
"correct": 22
|
| 355 |
+
},
|
| 356 |
+
"lora": {
|
| 357 |
+
"mean_nll": 2.7478320598602295,
|
| 358 |
+
"correct": 22
|
| 359 |
+
},
|
| 360 |
+
"tokens": 36
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"id": "bd3922f1f980db4a",
|
| 364 |
+
"split": "train",
|
| 365 |
+
"condition": "closed",
|
| 366 |
+
"passage": "runtime-pm",
|
| 367 |
+
"flash": {
|
| 368 |
+
"mean_nll": 3.1374902725219727,
|
| 369 |
+
"correct": 10
|
| 370 |
+
},
|
| 371 |
+
"lora": {
|
| 372 |
+
"mean_nll": 3.083566427230835,
|
| 373 |
+
"correct": 10
|
| 374 |
+
},
|
| 375 |
+
"tokens": 17
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"id": "bd3922f1f980db4a",
|
| 379 |
+
"split": "train",
|
| 380 |
+
"condition": "rag",
|
| 381 |
+
"passage": "runtime-pm",
|
| 382 |
+
"flash": {
|
| 383 |
+
"mean_nll": 2.0916523933410645,
|
| 384 |
+
"correct": 29
|
| 385 |
+
},
|
| 386 |
+
"lora": {
|
| 387 |
+
"mean_nll": 2.007739305496216,
|
| 388 |
+
"correct": 30
|
| 389 |
+
},
|
| 390 |
+
"tokens": 39
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"id": "cbc1e9f6fe9a7f05",
|
| 394 |
+
"split": "train",
|
| 395 |
+
"condition": "closed",
|
| 396 |
+
"passage": "runtime-pm",
|
| 397 |
+
"flash": {
|
| 398 |
+
"mean_nll": 4.845102310180664,
|
| 399 |
+
"correct": 5
|
| 400 |
+
},
|
| 401 |
+
"lora": {
|
| 402 |
+
"mean_nll": 4.802376747131348,
|
| 403 |
+
"correct": 6
|
| 404 |
+
},
|
| 405 |
+
"tokens": 21
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"id": "cbc1e9f6fe9a7f05",
|
| 409 |
+
"split": "train",
|
| 410 |
+
"condition": "rag",
|
| 411 |
+
"passage": "runtime-pm",
|
| 412 |
+
"flash": {
|
| 413 |
+
"mean_nll": 3.1034910678863525,
|
| 414 |
+
"correct": 23
|
| 415 |
+
},
|
| 416 |
+
"lora": {
|
| 417 |
+
"mean_nll": 3.0196313858032227,
|
| 418 |
+
"correct": 23
|
| 419 |
+
},
|
| 420 |
+
"tokens": 43
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"id": "9d1996ad5c56685d",
|
| 424 |
+
"split": "train",
|
| 425 |
+
"condition": "closed",
|
| 426 |
+
"passage": "runtime-pm",
|
| 427 |
+
"flash": {
|
| 428 |
+
"mean_nll": 5.304673194885254,
|
| 429 |
+
"correct": 3
|
| 430 |
+
},
|
| 431 |
+
"lora": {
|
| 432 |
+
"mean_nll": 5.18121337890625,
|
| 433 |
+
"correct": 3
|
| 434 |
+
},
|
| 435 |
+
"tokens": 15
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"id": "9d1996ad5c56685d",
|
| 439 |
+
"split": "train",
|
| 440 |
+
"condition": "rag",
|
| 441 |
+
"passage": "runtime-pm",
|
| 442 |
+
"flash": {
|
| 443 |
+
"mean_nll": 2.7945148944854736,
|
| 444 |
+
"correct": 23
|
| 445 |
+
},
|
| 446 |
+
"lora": {
|
| 447 |
+
"mean_nll": 2.7018532752990723,
|
| 448 |
+
"correct": 23
|
| 449 |
+
},
|
| 450 |
+
"tokens": 37
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"id": "8ca972b7a9511ea4",
|
| 454 |
+
"split": "train",
|
| 455 |
+
"condition": "closed",
|
| 456 |
+
"passage": "bus",
|
| 457 |
+
"flash": {
|
| 458 |
+
"mean_nll": 3.497398853302002,
|
| 459 |
+
"correct": 9
|
| 460 |
+
},
|
| 461 |
+
"lora": {
|
| 462 |
+
"mean_nll": 3.385347843170166,
|
| 463 |
+
"correct": 9
|
| 464 |
+
},
|
| 465 |
+
"tokens": 19
|
| 466 |
+
},
|
| 467 |
+
{
|
| 468 |
+
"id": "8ca972b7a9511ea4",
|
| 469 |
+
"split": "train",
|
| 470 |
+
"condition": "rag",
|
| 471 |
+
"passage": "bus",
|
| 472 |
+
"flash": {
|
| 473 |
+
"mean_nll": 1.8281834125518799,
|
| 474 |
+
"correct": 33
|
| 475 |
+
},
|
| 476 |
+
"lora": {
|
| 477 |
+
"mean_nll": 1.7630013227462769,
|
| 478 |
+
"correct": 34
|
| 479 |
+
},
|
| 480 |
+
"tokens": 46
|
| 481 |
+
},
|
| 482 |
+
{
|
| 483 |
+
"id": "f8c19451e270ded4",
|
| 484 |
+
"split": "train",
|
| 485 |
+
"condition": "closed",
|
| 486 |
+
"passage": "bus",
|
| 487 |
+
"flash": {
|
| 488 |
+
"mean_nll": 4.341787815093994,
|
| 489 |
+
"correct": 3
|
| 490 |
+
},
|
| 491 |
+
"lora": {
|
| 492 |
+
"mean_nll": 4.079854965209961,
|
| 493 |
+
"correct": 3
|
| 494 |
+
},
|
| 495 |
+
"tokens": 8
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"id": "f8c19451e270ded4",
|
| 499 |
+
"split": "train",
|
| 500 |
+
"condition": "rag",
|
| 501 |
+
"passage": "bus",
|
| 502 |
+
"flash": {
|
| 503 |
+
"mean_nll": 1.6406217813491821,
|
| 504 |
+
"correct": 27
|
| 505 |
+
},
|
| 506 |
+
"lora": {
|
| 507 |
+
"mean_nll": 1.5415351390838623,
|
| 508 |
+
"correct": 27
|
| 509 |
+
},
|
| 510 |
+
"tokens": 35
|
| 511 |
+
},
|
| 512 |
+
{
|
| 513 |
+
"id": "2abc5dbccbd01705",
|
| 514 |
+
"split": "train",
|
| 515 |
+
"condition": "closed",
|
| 516 |
+
"passage": "bus",
|
| 517 |
+
"flash": {
|
| 518 |
+
"mean_nll": 5.309503078460693,
|
| 519 |
+
"correct": 4
|
| 520 |
+
},
|
| 521 |
+
"lora": {
|
| 522 |
+
"mean_nll": 5.149583339691162,
|
| 523 |
+
"correct": 4
|
| 524 |
+
},
|
| 525 |
+
"tokens": 20
|
| 526 |
+
},
|
| 527 |
+
{
|
| 528 |
+
"id": "2abc5dbccbd01705",
|
| 529 |
+
"split": "train",
|
| 530 |
+
"condition": "rag",
|
| 531 |
+
"passage": "bus",
|
| 532 |
+
"flash": {
|
| 533 |
+
"mean_nll": 2.383319616317749,
|
| 534 |
+
"correct": 30
|
| 535 |
+
},
|
| 536 |
+
"lora": {
|
| 537 |
+
"mean_nll": 2.263237714767456,
|
| 538 |
+
"correct": 31
|
| 539 |
+
},
|
| 540 |
+
"tokens": 47
|
| 541 |
+
},
|
| 542 |
+
{
|
| 543 |
+
"id": "439fc846eae2caf1",
|
| 544 |
+
"split": "test",
|
| 545 |
+
"condition": "closed",
|
| 546 |
+
"passage": "kref",
|
| 547 |
+
"flash": {
|
| 548 |
+
"mean_nll": 2.530681848526001,
|
| 549 |
+
"correct": 8
|
| 550 |
+
},
|
| 551 |
+
"lora": {
|
| 552 |
+
"mean_nll": 2.4684524536132812,
|
| 553 |
+
"correct": 8
|
| 554 |
+
},
|
| 555 |
+
"tokens": 17
|
| 556 |
+
},
|
| 557 |
+
{
|
| 558 |
+
"id": "439fc846eae2caf1",
|
| 559 |
+
"split": "test",
|
| 560 |
+
"condition": "rag",
|
| 561 |
+
"passage": "kref",
|
| 562 |
+
"flash": {
|
| 563 |
+
"mean_nll": 1.7589157819747925,
|
| 564 |
+
"correct": 29
|
| 565 |
+
},
|
| 566 |
+
"lora": {
|
| 567 |
+
"mean_nll": 1.6992496252059937,
|
| 568 |
+
"correct": 29
|
| 569 |
+
},
|
| 570 |
+
"tokens": 41
|
| 571 |
+
},
|
| 572 |
+
{
|
| 573 |
+
"id": "85f79342c40b5e9a",
|
| 574 |
+
"split": "test",
|
| 575 |
+
"condition": "closed",
|
| 576 |
+
"passage": "kref",
|
| 577 |
+
"flash": {
|
| 578 |
+
"mean_nll": 5.277985095977783,
|
| 579 |
+
"correct": 5
|
| 580 |
+
},
|
| 581 |
+
"lora": {
|
| 582 |
+
"mean_nll": 5.271955490112305,
|
| 583 |
+
"correct": 5
|
| 584 |
+
},
|
| 585 |
+
"tokens": 11
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"id": "85f79342c40b5e9a",
|
| 589 |
+
"split": "test",
|
| 590 |
+
"condition": "rag",
|
| 591 |
+
"passage": "kref",
|
| 592 |
+
"flash": {
|
| 593 |
+
"mean_nll": 5.486237525939941,
|
| 594 |
+
"correct": 5
|
| 595 |
+
},
|
| 596 |
+
"lora": {
|
| 597 |
+
"mean_nll": 5.380731105804443,
|
| 598 |
+
"correct": 5
|
| 599 |
+
},
|
| 600 |
+
"tokens": 21
|
| 601 |
+
},
|
| 602 |
+
{
|
| 603 |
+
"id": "f9d70efd32d688b8",
|
| 604 |
+
"split": "test",
|
| 605 |
+
"condition": "closed",
|
| 606 |
+
"passage": "kref",
|
| 607 |
+
"flash": {
|
| 608 |
+
"mean_nll": 5.998867034912109,
|
| 609 |
+
"correct": 4
|
| 610 |
+
},
|
| 611 |
+
"lora": {
|
| 612 |
+
"mean_nll": 5.949280738830566,
|
| 613 |
+
"correct": 5
|
| 614 |
+
},
|
| 615 |
+
"tokens": 19
|
| 616 |
+
},
|
| 617 |
+
{
|
| 618 |
+
"id": "f9d70efd32d688b8",
|
| 619 |
+
"split": "test",
|
| 620 |
+
"condition": "rag",
|
| 621 |
+
"passage": "kref",
|
| 622 |
+
"flash": {
|
| 623 |
+
"mean_nll": 2.8052217960357666,
|
| 624 |
+
"correct": 27
|
| 625 |
+
},
|
| 626 |
+
"lora": {
|
| 627 |
+
"mean_nll": 2.729153633117676,
|
| 628 |
+
"correct": 27
|
| 629 |
+
},
|
| 630 |
+
"tokens": 43
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"id": "ae6933352e3fdf1c",
|
| 634 |
+
"split": "test",
|
| 635 |
+
"condition": "closed",
|
| 636 |
+
"passage": "workqueue",
|
| 637 |
+
"flash": {
|
| 638 |
+
"mean_nll": 2.616978168487549,
|
| 639 |
+
"correct": 9
|
| 640 |
+
},
|
| 641 |
+
"lora": {
|
| 642 |
+
"mean_nll": 2.5791103839874268,
|
| 643 |
+
"correct": 9
|
| 644 |
+
},
|
| 645 |
+
"tokens": 18
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"id": "ae6933352e3fdf1c",
|
| 649 |
+
"split": "test",
|
| 650 |
+
"condition": "rag",
|
| 651 |
+
"passage": "workqueue",
|
| 652 |
+
"flash": {
|
| 653 |
+
"mean_nll": 1.5410951375961304,
|
| 654 |
+
"correct": 30
|
| 655 |
+
},
|
| 656 |
+
"lora": {
|
| 657 |
+
"mean_nll": 1.4815492630004883,
|
| 658 |
+
"correct": 30
|
| 659 |
+
},
|
| 660 |
+
"tokens": 42
|
| 661 |
+
},
|
| 662 |
+
{
|
| 663 |
+
"id": "1798bd7a085d8722",
|
| 664 |
+
"split": "test",
|
| 665 |
+
"condition": "closed",
|
| 666 |
+
"passage": "workqueue",
|
| 667 |
+
"flash": {
|
| 668 |
+
"mean_nll": 2.6143860816955566,
|
| 669 |
+
"correct": 5
|
| 670 |
+
},
|
| 671 |
+
"lora": {
|
| 672 |
+
"mean_nll": 2.4940073490142822,
|
| 673 |
+
"correct": 5
|
| 674 |
+
},
|
| 675 |
+
"tokens": 12
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"id": "1798bd7a085d8722",
|
| 679 |
+
"split": "test",
|
| 680 |
+
"condition": "rag",
|
| 681 |
+
"passage": "workqueue",
|
| 682 |
+
"flash": {
|
| 683 |
+
"mean_nll": 1.9418718814849854,
|
| 684 |
+
"correct": 26
|
| 685 |
+
},
|
| 686 |
+
"lora": {
|
| 687 |
+
"mean_nll": 1.8492366075515747,
|
| 688 |
+
"correct": 26
|
| 689 |
+
},
|
| 690 |
+
"tokens": 36
|
| 691 |
+
},
|
| 692 |
+
{
|
| 693 |
+
"id": "f32d82eb1157a625",
|
| 694 |
+
"split": "test",
|
| 695 |
+
"condition": "closed",
|
| 696 |
+
"passage": "device-links",
|
| 697 |
+
"flash": {
|
| 698 |
+
"mean_nll": 4.673551559448242,
|
| 699 |
+
"correct": 3
|
| 700 |
+
},
|
| 701 |
+
"lora": {
|
| 702 |
+
"mean_nll": 4.594987869262695,
|
| 703 |
+
"correct": 4
|
| 704 |
+
},
|
| 705 |
+
"tokens": 9
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"id": "f32d82eb1157a625",
|
| 709 |
+
"split": "test",
|
| 710 |
+
"condition": "rag",
|
| 711 |
+
"passage": "device-links",
|
| 712 |
+
"flash": {
|
| 713 |
+
"mean_nll": 2.136794328689575,
|
| 714 |
+
"correct": 26
|
| 715 |
+
},
|
| 716 |
+
"lora": {
|
| 717 |
+
"mean_nll": 2.076038122177124,
|
| 718 |
+
"correct": 26
|
| 719 |
+
},
|
| 720 |
+
"tokens": 36
|
| 721 |
+
},
|
| 722 |
+
{
|
| 723 |
+
"id": "e6ea86b753a2fe78",
|
| 724 |
+
"split": "test",
|
| 725 |
+
"condition": "closed",
|
| 726 |
+
"passage": "device-links",
|
| 727 |
+
"flash": {
|
| 728 |
+
"mean_nll": 3.981576442718506,
|
| 729 |
+
"correct": 8
|
| 730 |
+
},
|
| 731 |
+
"lora": {
|
| 732 |
+
"mean_nll": 3.9334888458251953,
|
| 733 |
+
"correct": 8
|
| 734 |
+
},
|
| 735 |
+
"tokens": 21
|
| 736 |
+
},
|
| 737 |
+
{
|
| 738 |
+
"id": "e6ea86b753a2fe78",
|
| 739 |
+
"split": "test",
|
| 740 |
+
"condition": "rag",
|
| 741 |
+
"passage": "device-links",
|
| 742 |
+
"flash": {
|
| 743 |
+
"mean_nll": 2.55471134185791,
|
| 744 |
+
"correct": 33
|
| 745 |
+
},
|
| 746 |
+
"lora": {
|
| 747 |
+
"mean_nll": 2.505216598510742,
|
| 748 |
+
"correct": 33
|
| 749 |
+
},
|
| 750 |
+
"tokens": 48
|
| 751 |
+
}
|
| 752 |
+
]
|
training/scores.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_revision": "4640a0404660246e2bde9c607a1be3e47d29751f2d3753b29c65dccdb8d54051",
|
| 3 |
+
"capture_control": {
|
| 4 |
+
"prompt_only_top1": 1249,
|
| 5 |
+
"teacher_forced_first_top1": 1249,
|
| 6 |
+
"stock_last_top1": 151645,
|
| 7 |
+
"captured_last_top1": 151645
|
| 8 |
+
},
|
| 9 |
+
"optimizer": "GPUless native MeZO + pTPU",
|
| 10 |
+
"rank": 4,
|
| 11 |
+
"vocabulary_rows": 230,
|
| 12 |
+
"basis_dimensions": 24,
|
| 13 |
+
"steps": 96,
|
| 14 |
+
"directions": 4,
|
| 15 |
+
"train_seconds": 0.07714045100146905,
|
| 16 |
+
"dataset_sha256": "fa52ac81cee1368077ead8ceede42c2f8a73f5d11b2519ac4396aaf0636c4829",
|
| 17 |
+
"scores": {
|
| 18 |
+
"test-closed": {
|
| 19 |
+
"questions": 7,
|
| 20 |
+
"tokens": 107,
|
| 21 |
+
"flash": {
|
| 22 |
+
"nll": 3.9178617802735802,
|
| 23 |
+
"top1": 0.3925233644859813
|
| 24 |
+
},
|
| 25 |
+
"lora": {
|
| 26 |
+
"nll": 3.862633344168975,
|
| 27 |
+
"top1": 0.411214953271028
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"test-rag": {
|
| 31 |
+
"questions": 7,
|
| 32 |
+
"tokens": 267,
|
| 33 |
+
"flash": {
|
| 34 |
+
"nll": 2.405000734418519,
|
| 35 |
+
"top1": 0.6591760299625468
|
| 36 |
+
},
|
| 37 |
+
"lora": {
|
| 38 |
+
"nll": 2.3363428843601812,
|
| 39 |
+
"top1": 0.6591760299625468
|
| 40 |
+
}
|
| 41 |
+
},
|
| 42 |
+
"train-closed": {
|
| 43 |
+
"questions": 18,
|
| 44 |
+
"tokens": 315,
|
| 45 |
+
"flash": {
|
| 46 |
+
"nll": 4.417266894143725,
|
| 47 |
+
"top1": 0.34285714285714286
|
| 48 |
+
},
|
| 49 |
+
"lora": {
|
| 50 |
+
"nll": 4.288775567402915,
|
| 51 |
+
"top1": 0.35555555555555557
|
| 52 |
+
}
|
| 53 |
+
},
|
| 54 |
+
"train-rag": {
|
| 55 |
+
"questions": 18,
|
| 56 |
+
"tokens": 736,
|
| 57 |
+
"flash": {
|
| 58 |
+
"nll": 2.3376573099066382,
|
| 59 |
+
"top1": 0.6616847826086957
|
| 60 |
+
},
|
| 61 |
+
"lora": {
|
| 62 |
+
"nll": 2.2510526066888934,
|
| 63 |
+
"top1": 0.6739130434782609
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|