Say on the page that a worker needs llama.cpp, and that it can run without one
Browse files- distinct_server/presentation.py +7 -0
- distinct_server/render.py +36 -3
- gitignore-new.txt +0 -18
distinct_server/presentation.py
CHANGED
|
@@ -1346,6 +1346,13 @@ details[open] .c-libhelp__toggle::after{content:" -";}
|
|
| 1346 |
color:var(--c-text-2) !important; user-select:all;}
|
| 1347 |
.c-join__note{margin:0; font-size:var(--t-micro); color:var(--c-muted) !important;
|
| 1348 |
line-height:1.55; max-width:56ch;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1349 |
.c-join__note code{font-family:var(--mono); font-size:11px;
|
| 1350 |
background:var(--c-fill); border-radius:4px; padding:1px 5px;}
|
| 1351 |
.c-join__note .c-join__code{display:inline-block; padding:2px 8px;
|
|
|
|
| 1346 |
color:var(--c-text-2) !important; user-select:all;}
|
| 1347 |
.c-join__note{margin:0; font-size:var(--t-micro); color:var(--c-muted) !important;
|
| 1348 |
line-height:1.55; max-width:56ch;}
|
| 1349 |
+
/* The one outbound link in the setup panel. Underlined, because Gradio's own
|
| 1350 |
+
prose rules strip underlines from anchors inside its container and a link
|
| 1351 |
+
that reads as body text is a link nobody clicks -- and this one is the
|
| 1352 |
+
difference between a worker that runs models and one that does not. */
|
| 1353 |
+
.c-join__link{color:var(--c-accent) !important; text-decoration:underline !important;
|
| 1354 |
+
text-underline-offset:2px; font-weight:600;}
|
| 1355 |
+
.c-join__link:hover{color:var(--c-sage-deep) !important;}
|
| 1356 |
.c-join__note code{font-family:var(--mono); font-size:11px;
|
| 1357 |
background:var(--c-fill); border-radius:4px; padding:1px 5px;}
|
| 1358 |
.c-join__note .c-join__code{display:inline-block; padding:2px 8px;
|
distinct_server/render.py
CHANGED
|
@@ -336,7 +336,35 @@ def join_this_server(
|
|
| 336 |
"a <code>setup.py</code> this project does not have.</p>"
|
| 337 |
)
|
| 338 |
|
| 339 |
-
# STEP THREE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 340 |
# library defaults already in it.
|
| 341 |
code_note = (
|
| 342 |
f'<p class="c-join__note">Pairing code, one use and ten minutes: '
|
|
@@ -369,11 +397,16 @@ def join_this_server(
|
|
| 369 |
'<div class="c-step-num__body"><p class="c-step-num__head">Install it</p>'
|
| 370 |
f"{install}</div></li>"
|
| 371 |
'<li class="c-step-num"><span class="c-step-num__n">3</span>'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 372 |
'<div class="c-step-num__body"><p class="c-step-num__head">Point it at this server</p>'
|
| 373 |
f'<code class="c-join__address">{esc(first)}</code>{alternates}{code_note}'
|
| 374 |
f"{run_it}"
|
| 375 |
f"{picture}</div></li>"
|
| 376 |
-
#
|
|
|
|
| 377 |
#
|
| 378 |
# Sharing was one clause at the end of the previous step, and the
|
| 379 |
# question "how do several people use my machine?" kept coming back,
|
|
@@ -381,7 +414,7 @@ def join_this_server(
|
|
| 381 |
# point of running a worker at all, so it is a step of its own, and
|
| 382 |
# it says the non-obvious part out loud: the code is not spent by
|
| 383 |
# the first person who enters it.
|
| 384 |
-
'<li class="c-step-num"><span class="c-step-num__n">
|
| 385 |
'<div class="c-step-num__body">'
|
| 386 |
'<p class="c-step-num__head">Share it with whoever should use it</p>'
|
| 387 |
'<p class="c-join__note">When it pairs, the worker prints an <strong>access '
|
|
|
|
| 336 |
"a <code>setup.py</code> this project does not have.</p>"
|
| 337 |
)
|
| 338 |
|
| 339 |
+
# STEP THREE EXISTS BECAUSE THE PAGE SENT PEOPLE INTO A WALL IT NEVER
|
| 340 |
+
# MENTIONED.
|
| 341 |
+
#
|
| 342 |
+
# The panel used to be clone, install, run. A volunteer who followed it
|
| 343 |
+
# exactly got through all three and then met "This worker has no llama.cpp
|
| 344 |
+
# to run a model with" from the agent -- a requirement the page had never
|
| 345 |
+
# named, after a wait long enough to feel like the install had worked.
|
| 346 |
+
# Their words: the setup "is not the same as what is on the website".
|
| 347 |
+
#
|
| 348 |
+
# llama.cpp genuinely is a separate program, and it genuinely is optional:
|
| 349 |
+
# a worker with no runner still pairs and still offers every tool and skill
|
| 350 |
+
# in the library, which is most of what this network does. So this is a
|
| 351 |
+
# step with two honest endings rather than a prerequisite dressed as a
|
| 352 |
+
# warning, and the run command in step four follows whichever was chosen.
|
| 353 |
+
runner = (
|
| 354 |
+
'<p class="c-join__note">A model needs a program to run it, and that program '
|
| 355 |
+
"is <strong>llama.cpp</strong> — a separate project, not part of this one. "
|
| 356 |
+
'Download a build from <a class="c-join__link" href="https://github.com/'
|
| 357 |
+
'ggml-org/llama.cpp/releases" target="_blank" rel="noopener noreferrer">'
|
| 358 |
+
"github.com/ggml-org/llama.cpp/releases</a>, unzip it, and put "
|
| 359 |
+
"<code>llama-server</code> on your PATH — or drop it in a <code>runtime</code> "
|
| 360 |
+
"folder beside this one, where the worker looks first.</p>"
|
| 361 |
+
'<p class="c-join__note">Not interested in running models? Add '
|
| 362 |
+
"<code>--demo-runner</code> to the command in the next step. The worker still "
|
| 363 |
+
"pairs, and still runs every tool and skill in the library on your machine; "
|
| 364 |
+
"only the model's own replies are absent. You can add llama.cpp later.</p>"
|
| 365 |
+
)
|
| 366 |
+
|
| 367 |
+
# STEP FOUR: the run, with this server's address and this browser's own
|
| 368 |
# library defaults already in it.
|
| 369 |
code_note = (
|
| 370 |
f'<p class="c-join__note">Pairing code, one use and ten minutes: '
|
|
|
|
| 397 |
'<div class="c-step-num__body"><p class="c-step-num__head">Install it</p>'
|
| 398 |
f"{install}</div></li>"
|
| 399 |
'<li class="c-step-num"><span class="c-step-num__n">3</span>'
|
| 400 |
+
'<div class="c-step-num__body">'
|
| 401 |
+
'<p class="c-step-num__head">Get something to run the models with</p>'
|
| 402 |
+
f"{runner}</div></li>"
|
| 403 |
+
'<li class="c-step-num"><span class="c-step-num__n">4</span>'
|
| 404 |
'<div class="c-step-num__body"><p class="c-step-num__head">Point it at this server</p>'
|
| 405 |
f'<code class="c-join__address">{esc(first)}</code>{alternates}{code_note}'
|
| 406 |
f"{run_it}"
|
| 407 |
f"{picture}</div></li>"
|
| 408 |
+
# THE LAST STEP EXISTS BECAUSE PEOPLE ASK FOR IT AFTER READING THE ONE
|
| 409 |
+
# BEFORE IT.
|
| 410 |
#
|
| 411 |
# Sharing was one clause at the end of the previous step, and the
|
| 412 |
# question "how do several people use my machine?" kept coming back,
|
|
|
|
| 414 |
# point of running a worker at all, so it is a step of its own, and
|
| 415 |
# it says the non-obvious part out loud: the code is not spent by
|
| 416 |
# the first person who enters it.
|
| 417 |
+
'<li class="c-step-num"><span class="c-step-num__n">5</span>'
|
| 418 |
'<div class="c-step-num__body">'
|
| 419 |
'<p class="c-step-num__head">Share it with whoever should use it</p>'
|
| 420 |
'<p class="c-join__note">When it pairs, the worker prints an <strong>access '
|
gitignore-new.txt
DELETED
|
@@ -1,18 +0,0 @@
|
|
| 1 |
-
__pycache__/
|
| 2 |
-
*.py[cod]
|
| 3 |
-
.env
|
| 4 |
-
.DS_Store
|
| 5 |
-
|
| 6 |
-
# Build output from `pip install -e .`. Regenerated on every install, and a
|
| 7 |
-
# tracked copy means every volunteer's install shows up as a diff.
|
| 8 |
-
*.egg-info/
|
| 9 |
-
|
| 10 |
-
# Scratch left behind by the apply-and-push helpers used during development.
|
| 11 |
-
APPLY*.bat
|
| 12 |
-
TIDY*.bat
|
| 13 |
-
AGENT-SETUP.bat
|
| 14 |
-
push-log*.txt
|
| 15 |
-
distinct-update*.zip
|
| 16 |
-
agent-setup.log
|
| 17 |
-
runtime-outputs/
|
| 18 |
-
screenshots/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|