From f0f5e41acec7763937c26265810a703678611495 Mon Sep 17 00:00:00 2001 From: k3dz0r Date: Wed, 10 Dec 2025 08:52:08 -0300 Subject: [PATCH 1/4] update run-unsloth.sh: accept offer ID for dataset --- .vscode/extensions.json | 2 +- unsloth/scripts/run-unsloth.sh | 119 ++++++++++++++++++--------------- 2 files changed, 66 insertions(+), 55 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index fb6950bf..d009c6d4 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,4 +1,4 @@ { - "recommendations": ["dbaeumer.vscode-eslint"], + "recommendations": [], "unwantedRecommendations": ["esbenp.prettier-vscode"] } diff --git a/unsloth/scripts/run-unsloth.sh b/unsloth/scripts/run-unsloth.sh index a8605c01..c532f479 100755 --- a/unsloth/scripts/run-unsloth.sh +++ b/unsloth/scripts/run-unsloth.sh @@ -239,8 +239,8 @@ if [[ -z "${MODEL_RESOURCE:-}" ]]; then # Explicitly record no-model selection to avoid later prompts and include in Tip MODEL_RESOURCE="none" elif [[ "$MODEL_CHOICE" == "your" ]]; then - echo "Provide your model as one of: resource JSON path, numeric offer id, or folder path" - read -r -p "Model input: " MODEL_USER_INPUT || true + echo "Provide your model as a resource JSON path, numeric offer id, or folder path" + read -r -p "Model inputc: " MODEL_USER_INPUT || true if [[ -n "$MODEL_USER_INPUT" ]]; then if [[ "$MODEL_USER_INPUT" =~ ^[0-9]+$ ]]; then MODEL_RESOURCE="$MODEL_USER_INPUT" @@ -683,24 +683,30 @@ fi # Optional: Data attachment via DATA_RESOURCE or DATA_DIR (DATA_PATH alias supported) DATA_RESOURCE_VALUE="${DATA_RESOURCE:-}" if [[ -n "$DATA_RESOURCE_VALUE" ]]; then - # Prefer existing resource if provided - DATA_RESOURCE_ABS="$(abs_path "$DATA_RESOURCE_VALUE")" - add_env_kv_once DATA_RESOURCE "$DATA_RESOURCE_ABS" - if [[ -n "${SUGGEST_ONLY:-}" ]]; then - if [[ ! -f "$DATA_RESOURCE_ABS" ]]; then - echo "Suggest-only: DATA_RESOURCE does not exist: $DATA_RESOURCE_ABS (including in Tip anyway)" - fi + if [[ "$DATA_RESOURCE_VALUE" =~ ^[0-9]+$ ]]; then + # Numeric dataset offer id -> treat as direct --data + add_env_kv_once DATA_RESOURCE "$DATA_RESOURCE_VALUE" + DATA_DESCRIPTORS+=("$DATA_RESOURCE_VALUE") else - if [[ ! -f "$DATA_RESOURCE_ABS" ]]; then - echo "Error: DATA_RESOURCE file does not exist: $DATA_RESOURCE_ABS" >&2 - exit 1 + # Prefer existing resource if provided + DATA_RESOURCE_ABS="$(abs_path "$DATA_RESOURCE_VALUE")" + add_env_kv_once DATA_RESOURCE "$DATA_RESOURCE_ABS" + if [[ -n "${SUGGEST_ONLY:-}" ]]; then + if [[ ! -f "$DATA_RESOURCE_ABS" ]]; then + echo "Suggest-only: DATA_RESOURCE does not exist: $DATA_RESOURCE_ABS (including in Tip anyway)" + fi + else + if [[ ! -f "$DATA_RESOURCE_ABS" ]]; then + echo "Error: DATA_RESOURCE file does not exist: $DATA_RESOURCE_ABS" >&2 + exit 1 + fi + DATA_DESCRIPTORS+=("$DATA_RESOURCE_ABS") fi - DATA_DESCRIPTORS+=("$DATA_RESOURCE_ABS") fi else DATA_DIR_VALUE="${DATA_DIR:-${DATA_PATH:-}}" if [[ -z "$DATA_DIR_VALUE" ]]; then - read -r -p "Provide your dataset as a resource JSON path or folder path (optional, press Enter to skip): " DATA_DIR_VALUE || true + read -r -p "Provide your dataset as a resource JSON path, numeric offer id, or folder path (optional, press Enter to skip): " DATA_DIR_VALUE || true fi if [[ -n "$DATA_DIR_VALUE" ]]; then # Treat explicit DATA_DIR=none (case-insensitive) as skip, since suggestions include it @@ -710,48 +716,52 @@ else echo "Skipping dataset attachment (DATA_DIR=none)" ;; *) - # If a JSON descriptor is provided instead of a folder, treat it as DATA_RESOURCE - if [[ -f "$DATA_DIR_VALUE" ]] \ - && grep -q '"hash"' "$DATA_DIR_VALUE" \ - && grep -q '"encryption"' "$DATA_DIR_VALUE" \ - && grep -q '"resource"' "$DATA_DIR_VALUE"; then - DATA_RESOURCE_ABS="$(abs_path "$DATA_DIR_VALUE")" - add_env_kv_once DATA_RESOURCE "$DATA_RESOURCE_ABS" - if [[ -z "${SUGGEST_ONLY:-}" ]]; then - DATA_DESCRIPTORS+=("$DATA_RESOURCE_ABS") - fi - else - # Compute descriptor name for suggestion regardless of existence - DATA_DIR_BASE="$(basename -- "$DATA_DIR_VALUE")" - DATA_ARCHIVE_NAME="${DATA_DIR_BASE}-data.tar.gz" - DATA_DESCRIPTOR_NAME="${DATA_DIR_BASE}-data.json" - # In suggestion, prefer *_RESOURCE form - add_env_kv_once DATA_RESOURCE "$(abs_path "$DATA_DESCRIPTOR_NAME")" - if [[ ! -d "$DATA_DIR_VALUE" ]]; then - if [[ -n "${SUGGEST_ONLY:-}" ]]; then - echo "Suggest-only: DATA_DIR is not a directory: $DATA_DIR_VALUE (including DATA_RESOURCE in Tip anyway)" - else - echo "Error: DATA_DIR is not a directory: $DATA_DIR_VALUE" >&2 - exit 1 - fi - else - DATA_DIR_ABS="$(cd "$DATA_DIR_VALUE" && pwd)" - DATA_DIR_BASE="$(basename -- "$DATA_DIR_ABS")" - DATA_TS="$(date +%s)" - DATA_STORJ_NAME="${DATA_DIR_BASE}-data-${DATA_TS}" - DATA_DESCRIPTOR_NAME="${DATA_DIR_BASE}-data.json" - - echo "Step 6.X: Preparing data folder upload (no archiving)..." - if [[ -z "${SUGGEST_ONLY:-}" ]]; then - echo "Uploading data folder via spctl files upload..." - "$SPCTL" files upload "$DATA_DIR_ABS" --filename "$DATA_STORJ_NAME" --output "$DATA_DESCRIPTOR_NAME" --config "$CONFIG_FILE" --use-addon - echo "Upload descriptor saved to: $DATA_DESCRIPTOR_NAME" + if [[ "$DATA_DIR_VALUE" =~ ^[0-9]+$ ]]; then + # Numeric dataset offer id -> treat as direct --data + add_env_kv_once DATA_RESOURCE "$DATA_DIR_VALUE" + DATA_DESCRIPTORS+=("$DATA_DIR_VALUE") + # If a JSON descriptor is provided instead of a folder, treat it as DATA_RESOURCE + elif [[ -f "$DATA_DIR_VALUE" ]] \ + && grep -q '"hash"' "$DATA_DIR_VALUE" \ + && grep -q '"encryption"' "$DATA_DIR_VALUE" \ + && grep -q '"resource"' "$DATA_DIR_VALUE"; then + DATA_RESOURCE_ABS="$(abs_path "$DATA_DIR_VALUE")" + add_env_kv_once DATA_RESOURCE "$DATA_RESOURCE_ABS" + if [[ -z "${SUGGEST_ONLY:-}" ]]; then + DATA_DESCRIPTORS+=("$DATA_RESOURCE_ABS") + fi else - echo "Suggest-only: would upload folder $DATA_DIR_ABS as name $DATA_STORJ_NAME and produce $DATA_DESCRIPTOR_NAME" + # Compute descriptor name for suggestion regardless of existence + DATA_DIR_BASE="$(basename -- "$DATA_DIR_VALUE")" + DATA_ARCHIVE_NAME="${DATA_DIR_BASE}-data.tar.gz" + DATA_DESCRIPTOR_NAME="${DATA_DIR_BASE}-data.json" + # In suggestion, prefer *_RESOURCE form + add_env_kv_once DATA_RESOURCE "$(abs_path "$DATA_DESCRIPTOR_NAME")" + if [[ ! -d "$DATA_DIR_VALUE" ]]; then + if [[ -n "${SUGGEST_ONLY:-}" ]]; then + echo "Suggest-only: DATA_DIR is not a directory: $DATA_DIR_VALUE (including DATA_RESOURCE in Tip anyway)" + else + echo "Error: DATA_DIR is not a directory: $DATA_DIR_VALUE" >&2 + exit 1 + fi + else + DATA_DIR_ABS="$(cd "$DATA_DIR_VALUE" && pwd)" + DATA_DIR_BASE="$(basename -- "$DATA_DIR_ABS")" + DATA_TS="$(date +%s)" + DATA_STORJ_NAME="${DATA_DIR_BASE}-data-${DATA_TS}" + DATA_DESCRIPTOR_NAME="${DATA_DIR_BASE}-data.json" + + echo "Step 6.X: Preparing data folder upload (no archiving)..." + if [[ -z "${SUGGEST_ONLY:-}" ]]; then + echo "Uploading data folder via spctl files upload..." + "$SPCTL" files upload "$DATA_DIR_ABS" --filename "$DATA_STORJ_NAME" --output "$DATA_DESCRIPTOR_NAME" --config "$CONFIG_FILE" --use-addon + echo "Upload descriptor saved to: $DATA_DESCRIPTOR_NAME" + else + echo "Suggest-only: would upload folder $DATA_DIR_ABS as name $DATA_STORJ_NAME and produce $DATA_DESCRIPTOR_NAME" + fi + DATA_DESCRIPTORS+=("$(abs_path "$DATA_DESCRIPTOR_NAME")") + fi fi - DATA_DESCRIPTORS+=("$(abs_path "$DATA_DESCRIPTOR_NAME")") - fi - fi ;; esac else @@ -760,6 +770,7 @@ else fi fi + # Optional: Model attachment via MODEL_RESOURCE or MODEL_DIR MODEL_RESOURCE_VALUE="${MODEL_RESOURCE:-}" if [[ -n "$MODEL_RESOURCE_VALUE" ]]; then From 5e62ffb535653d10ca10241304f459ab20c1e7de Mon Sep 17 00:00:00 2001 From: k3dz0r Date: Wed, 10 Dec 2025 10:50:39 -0300 Subject: [PATCH 2/4] Add README to unsloth and vllm. Fix outdated and broken docs links --- Blockchain/README.md | 2 - Python/readme.md | 2 +- Tunnel Client/chat/README.md | 4 - .../components/Main/Blocks/Deploy/helpers.ts | 8 +- .../Main/Blocks/Description/helpers.ts | 2 +- .../components/Main/Blocks/Title/helpers.ts | 2 +- .../client/components/PageLinks/helpers.ts | 3 +- .../components/Room/InfoAccordion/helpers.tsx | 4 +- Tunnel Client/minecraft/README.md | 4 - .../static-content/src/common/data.ts | 8 +- .../src/views/Content/Marketplace/helpers.ts | 2 +- .../src/views/Content/Rewards/helpers.ts | 4 +- readme.md | 32 ++-- unsloth/README.md | 172 ++++++++++++++++++ vllm/README.md | 82 +++++++++ 15 files changed, 289 insertions(+), 42 deletions(-) create mode 100644 unsloth/README.md diff --git a/Blockchain/README.md b/Blockchain/README.md index cca4f06b..c42fcb43 100644 --- a/Blockchain/README.md +++ b/Blockchain/README.md @@ -1,5 +1,3 @@ # Superprotocol Oracle This is example of [Blockchain Oracle](https://en.wikipedia.org/wiki/Blockchain_oracle) that can be run on Superprotocol. - -Follow to our documentation [page](https://docs.superprotocol.com/developers/deployment_guides/blockchain/oracles) to get up and run instructions diff --git a/Python/readme.md b/Python/readme.md index 5b793859..5a262e2e 100644 --- a/Python/readme.md +++ b/Python/readme.md @@ -1,3 +1,3 @@ ## Introduction -Base image for Python solutions. See [these guides](https://docs.superprotocol.com/developers/deployment_guides/python) to learn how to use it for deploying your own solutions on Super Protocol. +Base image for Python solutions. \ No newline at end of file diff --git a/Tunnel Client/chat/README.md b/Tunnel Client/chat/README.md index 9b6f0bb0..e6f56cc4 100644 --- a/Tunnel Client/chat/README.md +++ b/Tunnel Client/chat/README.md @@ -2,10 +2,6 @@ This is NextJS application SuperProtocol Secret Chat. -Detailed project description you can find in our docs [here](https://docs.superprotocol.com/developers/offers/superchat/) - -Up and run instructions you can find [here](https://docs.superprotocol.com/developers/deployment_guides/tunnels/superchat) - # Develop * Touch .env file with [env](#env) diff --git a/Tunnel Client/chat/src/client/components/Main/Blocks/Deploy/helpers.ts b/Tunnel Client/chat/src/client/components/Main/Blocks/Deploy/helpers.ts index ddc5068d..f273072b 100644 --- a/Tunnel Client/chat/src/client/components/Main/Blocks/Deploy/helpers.ts +++ b/Tunnel Client/chat/src/client/components/Main/Blocks/Deploy/helpers.ts @@ -12,11 +12,11 @@ export const list = [ export const linksDoc = [ { - text: 'Read Marketplace GUI Guide', - href: 'https://docs.superprotocol.com/developers/marketplace/walkthrough', + text: 'Read Marketplace GUI overview', + href: 'https://docs.superprotocol.com/marketplace', }, { - text: 'Read CLI Deployment Guides', - href: 'https://docs.superprotocol.com/developers/deployment_guides', + text: 'Read CLI Deployment Guide', + href: 'https://docs.superprotocol.com/cli/guides/quick-guide', }, ]; diff --git a/Tunnel Client/chat/src/client/components/Main/Blocks/Description/helpers.ts b/Tunnel Client/chat/src/client/components/Main/Blocks/Description/helpers.ts index c93bbbd2..d7e6c533 100644 --- a/Tunnel Client/chat/src/client/components/Main/Blocks/Description/helpers.ts +++ b/Tunnel Client/chat/src/client/components/Main/Blocks/Description/helpers.ts @@ -25,7 +25,7 @@ export const contentLinkBoxes = [ title: 'Join Developer Community', text: 'Super Protocol is operating on the forward edge of innovations: decentralized confidential computing for Web3. We strongly believe that this is the future. Do you? Be with us for the Next Big Thing!', hrefText: 'Learn About Devs Community', - href: 'https://docs.superprotocol.com/developers/', + href: 'https://docs.superprotocol.com/cli/', }, ]; diff --git a/Tunnel Client/chat/src/client/components/Main/Blocks/Title/helpers.ts b/Tunnel Client/chat/src/client/components/Main/Blocks/Title/helpers.ts index 75571c0f..b0a012f3 100644 --- a/Tunnel Client/chat/src/client/components/Main/Blocks/Title/helpers.ts +++ b/Tunnel Client/chat/src/client/components/Main/Blocks/Title/helpers.ts @@ -5,6 +5,6 @@ export const text = 'Created by the Super Protocol team to illustrate the capabi export const href = 'https://superprotocol.com'; -export const hrefGuide = 'https://docs.superprotocol.com/developers/offers/superchat'; +export const hrefGuide = 'https://docs.superprotocol.com/cli'; export const btnsText = ['Create Chat Room', 'Return to Chat', 'Join Chat Room']; diff --git a/Tunnel Client/chat/src/client/components/PageLinks/helpers.ts b/Tunnel Client/chat/src/client/components/PageLinks/helpers.ts index 37fa6a45..c3197e7a 100644 --- a/Tunnel Client/chat/src/client/components/PageLinks/helpers.ts +++ b/Tunnel Client/chat/src/client/components/PageLinks/helpers.ts @@ -2,6 +2,5 @@ import { PageLink } from './types'; export const list: PageLink[] = [ { title: 'Website', href: 'https://superprotocol.com/' }, - { title: 'Testnet', href: 'https://docs.superprotocol.com/testnet/' }, - { title: 'Guide', href: 'https://docs.superprotocol.com/developers/offers/superchat' }, + { title: 'Docs', href: 'https://docs.superprotocol.com/' }, ]; diff --git a/Tunnel Client/chat/src/client/components/Room/InfoAccordion/helpers.tsx b/Tunnel Client/chat/src/client/components/Room/InfoAccordion/helpers.tsx index 7b3aa18a..a9985c86 100644 --- a/Tunnel Client/chat/src/client/components/Room/InfoAccordion/helpers.tsx +++ b/Tunnel Client/chat/src/client/components/Room/InfoAccordion/helpers.tsx @@ -8,7 +8,7 @@ export const intoList: { title: string; content: JSX.Element; eventKey: string; { title: 'What is confidential computing?', content:
Confidential computing is the animal-friendly version of a sealed box with Schrödinger's cat inside. This box is called Trusted Execution Environment (TEE) and it’s protected by the server’s special hardware. This secure box cannot be opened by any unauthorized third parties.
, eventKey: '2' }, { title: 'How is it decentralized?', content:
Super Protocol has no single point of failure. First of all, confidential compute machines are sourced from multiple cloud providers (as opposed to centralized CSPs which are limited to their own data centers). This ensures that no single authority can shut down your deployment. Second, data is saved to decentralized databases. And third, of course, Super Protocol runs on blockchain.
, eventKey: '3' }, { title: 'Why is this special?', content:
Web3 decentralized applications (dApps) are built using smart-contracts, which are simple and very limited apps running on-chain. Super Protocol expands the capabilities of Web3 by adding a decentralized off-chain computing layer which may be used by dApps to perform any types of complex computations in full confidentiality, beyond the limits imposed by smart-contracts.
, eventKey: '4' }, - { title: 'What is Testnet 4?', content:
Super Protocol is still in the testnet phase - we are adding new functionality all the time. Everyone is welcome to join and deploy their own chat. Please follow this link to register.
, eventKey: '5' }, - { title: 'I want to build on Super Protocol', content:
Great! As it happens, we are now looking for developers who are passionate about Web3 technologies and curious about confidential computing to start creating their apps on Super Protocol – with the full support of our team. Please go here to learn more.
, eventKey: '6' }, + { title: 'What is Testnet 4?', content:
Super Protocol is still in the testnet phase - we are adding new functionality all the time. Everyone is welcome to join and deploy their own chat. Please follow this link to register.
, eventKey: '5' }, + { title: 'I want to build on Super Protocol', content:
Great! As it happens, we are now looking for developers who are passionate about Web3 technologies and curious about confidential computing to start creating their apps on Super Protocol – with the full support of our team. Please go here to learn more.
, eventKey: '6' }, { title: 'How do I report a problem?', content:
Nobody’s perfect and this chat is still an experimental release. If you see something that doesn’t look right, please tell us and we will fix it! You can contact us through Discord.
, eventKey: '7' }, ]; diff --git a/Tunnel Client/minecraft/README.md b/Tunnel Client/minecraft/README.md index 8786af4d..152b5b1f 100644 --- a/Tunnel Client/minecraft/README.md +++ b/Tunnel Client/minecraft/README.md @@ -11,7 +11,3 @@ Key features: - Client — [prismarine-web-client](https://github.com/PrismarineJS/prismarine-web-client) The client includes a web-server that connects to the MS Server and provides the UI to the user in a web browser. - -## Installation and deployment guide - -To up and run Minecraft locally or on the Superprotocol please follow [this documentation](https://docs.superprotocol.com/developers/deployment_guides/tunnels/minecraft) diff --git a/Tunnel Client/static-content/src/common/data.ts b/Tunnel Client/static-content/src/common/data.ts index 9ce77376..c0246cf9 100644 --- a/Tunnel Client/static-content/src/common/data.ts +++ b/Tunnel Client/static-content/src/common/data.ts @@ -11,12 +11,12 @@ export const links = [ }, { id: 'faq', - title: 'FAQ', - href: 'https://docs.superprotocol.com/faq', + title: 'Docs', + href: 'https://docs.superprotocol.com', }, { id: 'developers', - title: 'Developers', - href: 'https://docs.superprotocol.com/developers/', + title: 'Super Protocol CLI', + href: 'https://docs.superprotocol.com/cli', }, ]; diff --git a/Tunnel Client/static-content/src/views/Content/Marketplace/helpers.ts b/Tunnel Client/static-content/src/views/Content/Marketplace/helpers.ts index 83401d23..282de6ed 100644 --- a/Tunnel Client/static-content/src/views/Content/Marketplace/helpers.ts +++ b/Tunnel Client/static-content/src/views/Content/Marketplace/helpers.ts @@ -23,5 +23,5 @@ export const list = [ export const footer = { text: 'Learn About Marketplace', - href: 'https://docs.superprotocol.com/developers/marketplace', + href: 'https://docs.superprotocol.com/marketplace', }; diff --git a/Tunnel Client/static-content/src/views/Content/Rewards/helpers.ts b/Tunnel Client/static-content/src/views/Content/Rewards/helpers.ts index 3daa28ea..4ff6ca2c 100644 --- a/Tunnel Client/static-content/src/views/Content/Rewards/helpers.ts +++ b/Tunnel Client/static-content/src/views/Content/Rewards/helpers.ts @@ -5,7 +5,7 @@ export const content = [ text: 'Want to see it for yourself? We have launched Testnet 4 - the next phase of our protocol. Introducing the system of offer requirements and compute configurations, critical for proper resource utilization, pricing, monetization and marketplace economics. Be with us for the revolution!', footer: { text: 'Apply for Testnet 4', - href: 'https://docs.superprotocol.com/testnet', + href: 'https://docs.superprotocol.com/', }, }, { @@ -13,7 +13,7 @@ export const content = [ text: 'Take part in building your solutions for decentralized confidential environments. We have prepared developers documentation with CLI deployment guides and examples.', footer: { text: 'Start Building on Super Protocol', - href: 'https://docs.superprotocol.com/developers', + href: 'https://docs.superprotocol.com/cli/guides/quick-guide', }, }, ]; diff --git a/readme.md b/readme.md index 02988c49..eec09957 100644 --- a/readme.md +++ b/readme.md @@ -1,19 +1,23 @@ ## Introduction -This repository contains solutions that are already deployed on Super Protocol and are available to all testnet participants. Some solutions designed for end users and require only some input data to function. Then there are base images used by other solutions which could only be accessed through [Command-line Interface (CLI)](https://github.com/Super-Protocol/spctl). - -| Solution | Description | -|:---------------------------------------------------|:----------------------------------------------------------------------------------------------------| -| [Python](./Python) | Base image for Python solutions. | -| [Image Classification](./Image%20Classification) | Machine learning algorithm that determines what is shown in the picture. | -| [Face Recognition](./Face%20Recognition) | Machine learning algorithm that calculates the probability that two photos contain the same person. | -| [Speech Recognition](./Speech%20Recognition) | Machine learning algorithm that transforms speech into text. | -| [Oracles](./Blockchain) | Confidential Oracle service. | -| [SuperChat](./Tunnel%20Client/chat) | SuperChat tunnel client. | -| [Minecraft](./Tunnel%20Client/minecraft) | Minecraft tunnel client. | -| [Static Content](./Tunnel%20Client/static-content) | Static website tunnel client. | - - +This repository contains solutions already deployed on Super Protocol and legacy ones. + +| Solution | Description | +|:-------------------------------------------------------|:----------------------------------------------------------------------------------------------------| +| [Python](./Python) | Base image for Python solutions. | +| [Image Classification](./Image%20Classification) | Machine learning algorithm that determines what is shown in the picture. | +| [Face Recognition](./Face%20Recognition) | Machine learning algorithm that calculates the probability that two photos contain the same person. | +| [Speech Recognition](./Speech%20Recognition) | Machine learning algorithm that transforms speech into text. | +| [Oracles](./Blockchain) | Confidential Oracle service. | +| [SuperChat](./Tunnel%20Client/chat) | SuperChat tunnel client. | +| [Minecraft](./Tunnel%20Client/minecraft) | Minecraft tunnel client. | +| [Static Content](./Tunnel%20Client/static-content) | Static website tunnel client. | +| [ComfyUI](./ComfyUI) | Open-source platform for generating visual and audio content using AI models. | +| [Jupyter Notebook](./Jupyter) | Open-source, interactive development environment. | +| [n8n](./n8n) | Workflow automation platform. | +| [Text Generation WebUI](./Text%20Generation%20WebUI) | Web UI designed for running large language models. | +| [Unsloth](./Unsloth) | Open-source framework for LLM fine-tuning and reinforcement learning. | +| [vLLM](./vllm) | Inference and serving engine for LLMs. | ## Steps to download solution diff --git a/unsloth/README.md b/unsloth/README.md new file mode 100644 index 00000000..04185340 --- /dev/null +++ b/unsloth/README.md @@ -0,0 +1,172 @@ +# Super Protocol Unsloth + +This repository contains the Super Protocol packaging of [Unsloth](https://unsloth.ai/), an open-source framework for LLM fine-tuning and reinforcement learning. + +The solution allows you to run fine-tuning within Super Protocol's Trusted Execution Environment (TEE). This provides enhanced security and privacy and enables a range of [confidential collaboration](https://docs.develop.superprotocol.com/cli/guides/fine-tune) scenarios. + +The repository includes a Dockerfile and a helper script `run-unsloth.sh` that facilitates workflow creation. Note that `run-unsloth.sh` does not build an image and instead uses a pre-existing solution offer. + +## run-unsloth.sh + +### Prerequisites + +- [SPCTL](https://docs.develop.superprotocol.com/cli/): Super Protocol CLI tool and its configuration file (`config.json`). +- BNB and SPPI tokens (opBNB) to pay for transactions and orders. + +Copy SPCTL’s binary and `config.json` to the `unsloth/scripts` directory inside the cloned Super-Protocol/solutions repository. + +### Prepare training scripts + +When preparing your training scripts, keep in mind the special file structure within the TEE: + +| **Location** | **Purpose** | **Access** | +| :- | :- | :- | +| `/sp/inputs/input-0001`
`/sp/inputs/input-0002`
etc. | Possible data locations
(AI model, dataset, training scripts, etc.) | Read-only | +| `/sp/output` | Output directory for results | Read and write | +| `/sp/certs` | Contains the order certificate, private key, and workloadInfo. | Read-only | + +Your scripts must find the data in `/sp/inputs` and write the results to `/sp/output`. + +### Place an order + +Initiate a dialog to construct and place an order: + +```shell +./run-unsloth.sh +``` + +When prompted: + +1. `Enter TEE offer id (number)`: Enter a compute offer ID. This determines the available compute resources and cost of your order. You can find the full list of available compute offers on the [Marketplace](https://marketplace.superprotocol.com/). + +2. `Choose run mode`: `1) file`. + +3. `Select the model option`: + +- `1) Medgemma 27b (offer 15900)`: Select this option if you need an untuned MedGemma 27B. +- `2) your model`: Select this option to use another model. Further, when prompted about `Model input`, enter one of the following: + - a path to the model's resource JSON file, if it was already uploaded with SPCTL + - model offer ID, if the model exists on the Marketplace + - a path to the local directory with the model to upload it using SPCTL. +- `3) no model`: No model will be used. + +4. `Enter path to a .py/.ipynb file OR a directory`: Enter the path to your training script (file or directory). For a directory, select the file to run (entrypoint) when prompted. Note that you cannot reuse resource files in this step; scripts should be uploaded every time. + +5. `Provide your dataset as a resource JSON path, numeric offer id, or folder path`: As with the model, enter one of the following: +- a path to the dataset's resource JSON file, if it was already uploaded with SPCTL +- dataset offer ID, if the dataset exists on the Marketplace +- a path to the local directory with the dataset to upload it using SPCTL. + +6. `Upload SPCTL config file as a resource?`: Answer `N` unless you need to use SPCTL from within the TEE during the order execution. In this case, your script should run a `curl` command to download SPCTL and find the uploaded `config.json` in the `/sp/inputs/` subdirectories. + +7. Wait for the order to be created and find the order ID in the output, for example: + +```shell +Unsloth order id: 259126 +Done. +``` + +### Check the order result + +1. The order will take some time to complete. Check the order status: + +```shell +./spctl orders get +``` + +Replace `` with your order ID. + +If you lost the order ID, check all your orders to find it: + +```shell +./spctl orders list --my-account --type tee +``` + +2. When the order status is `Done` or `Error`, download the result: + +```shell +./spctl orders download-result +``` + +The downloaded TAR.GZ archive contains the results in the `output` directory and execution logs. + +## Dry run + +```shell +./run-unsloth.sh --suggest-only +``` + +The option `--suggest-only` allows you to perform a dry run without actually uploading files and creating orders. + +Complete the dialog, as usual; only use absolute paths. + +In the output, you will see a prepared command for running the script non-interactively, allowing you to easily modify the variables and avoid re-entering the dialog. For example: + +```shell +RUN_MODE=file \ +RUN_DIR=/home/user/Downloads/yma-run \ +RUN_FILE=sft_example.py \ +DATA_RESOURCE=/home/user/unsloth/scripts/yma_data_example-data.json \ +MODEL_RESOURCE=/home/user/unsloth/scripts/medgemma-27b-ft-merged.resource.json \ +/home/user/unsloth/scripts/run-unsloth.sh \ +--tee 8 \ +--config ./config.json +``` + +## Jupyter Notebook + +You can launch and use Jupyter Notebook instead of uploading training scripts directly. + +Initiate a dialog: + +```shell +./run-unsloth.sh +``` + +When prompted: + +1. `Enter TEE offer id`: Enter a compute offer ID. This determines the available compute resources and cost of your order. You can find the full list of available compute offers on the [Marketplace](https://marketplace.superprotocol.com/). + +2. `Choose run mode`: `2) jupyter-server`. + +3. `Select the model option`: + +- `1) Medgemma 27b (offer 15900)`: Select this option if you need an untuned MedGemma 27B. +- `2) your model`: Select this option to use another model. Further, when prompted about `Model input`, enter one of the following: + - a path to the model's resource JSON file, if it was already uploaded with SPCTL + - model offer ID, if the model exists on the Marketplace + - a path to the local directory with the model to upload it using SPCTL. +- `3) no model`: No model will be used. + +4. `Enter Jupyter password` or press Enter to proceed without a password. + +5. `Select domain option`: + +- `1) Temporary Domain (*.superprotocol.io)` is suitable for testing and quick deployments. +- `2) Own domain` will require you to provide a domain name, TLS certificate, private key, and a tunnel server auth token. + +Wait for the Tunnels Launcher order to be created. + +6. `Provide your dataset as a resource JSON path, numeric offer id, or folder path`: As with the model, enter one of the following: +- a path to the dataset's resource JSON file, if it was already uploaded with SPCTL +- dataset offer ID, if the dataset exists on the Marketplace +- a path to the local directory with the dataset to upload it using SPCTL. + +7. `Upload SPCTL config file as a resource?`: Answer `N` unless you need to use SPCTL from within the TEE during the order execution. In this case, your script should run a `curl` command to download SPCTL and find the uploaded `config.json` in the `/sp/inputs/` subdirectories. + +8. Wait for the Jupyter order to be ready and find a link in the output; for example: + +```shell +=================================================== +Jupyter instance is available at: https://beja-bine-envy.superprotocol.io +=================================================== +``` + +8. Open the link in your browser to access Jupyter’s UI. + +**Note**: + +The data in `/sp/output` will not be published as the order result when running the Jupyter server. To save your fine-tuning results, upload them either: +- via Python code +- using the integrated terminal in the Jupyter server +- using SPCTL with the config uploaded at Step 7. \ No newline at end of file diff --git a/vllm/README.md b/vllm/README.md index 8b6ff30d..e89fe376 100644 --- a/vllm/README.md +++ b/vllm/README.md @@ -1 +1,83 @@ # Super Protocol vLLM + +This repository contains the Super Protocol packaging of [vLLM](https://www.vllm.ai/), an inference and serving engine for LLMs. It includes a Dockerfile and helper scripts for running Unsloth workloads on Super Protocol. + +The solution allows you to run LLM inference within Super Protocol's Trusted Execution Environment (TEE). + +The repository includes a Dockerfile and a helper script `run-vllm.sh` that facilitates workflow creation. Note that `run-vllm.sh` does not build an image and instead uses a pre-existing solution offer. + +## run-vllm.sh + +### Prerequisites + +- [SPCTL](https://docs.develop.superprotocol.com/cli/): Super Protocol CLI tool and its configuration file (`config.json`). +- BNB and SPPI tokens (opBNB) to pay for transactions and orders. + +Copy SPCTL’s binary and `config.json` to the `vllm/scripts` directory inside the cloned Super-Protocol/solutions repository. + +### Place an order + +Initiate a dialog to construct and place an order: + +```shell +./run-vllm.sh +``` + +When prompted: + +1. `Select domain option`: + +- `1) Temporary Domain (*.superprotocol.io)` is suitable for testing and quick deployments. +- `2) Own domain` will require you to provide a domain name, TLS certificate, private key, and a tunnel server auth token. + +2. `Enter TEE offer id`: Enter a compute offer ID. This determines the available compute resources and cost of your order. You can find the full list of available compute offers on the [Marketplace](https://marketplace.superprotocol.com/). + +3. `Provide model as resource JSON path, numeric offer id, or folder path`: + +- a path to the model's resource JSON file, if it was already uploaded with SPCTL +- model offer ID, if the model exists on the Marketplace +- a path to the local directory with the model to upload it using SPCTL. + +4. `Enter API key` or press `Enter` to generate one automatically. + +Wait for the deployment to be ready and find the information about it in the output, for example: + +```shell +=================================================== +VLLM server is available at: https://whau-trug-nail.superprotocol.io +API key: d75c577d-e538-4d09-8f59-a0f00ae961a3 +Order IDs: Launcher=269042, VLLM=269044 +=================================================== +``` + +5. Once deployed on Super Protocol, your model runs inside a TEE and exposes an OpenAI-compatible API. You can interact with it as you would with a local vLLM instance. + +Depending on the type of request you want to make, use the following API endpoints: + +- Chat Completions (`/v1/chat/completions`) +- Text Completions (`/v1/completions`) +- Embeddings (`/v1/embeddings`) +- Audio Transcriptions & Translations (`/v1/audio/transcriptions`, `/v1/audio/translations`) + +See the [full list of API endpoints](https://docs.vllm.ai/en/latest/serving/openai_compatible_server/). + +## Dry run + +```shell +./run-vllm.sh --suggest-only +``` + +The option `--suggest-only` allows you to perform a dry run without actually uploading files and creating orders. + +Complete the dialog, as usual; only use absolute paths. + +In the output, you will see a prepared command for running the script non-interactively, allowing you to easily modify the variables and avoid re-entering the dialog. For example: + +```shell +RUN_MODE=temporary \ +MODEL_RESOURCE=55 \ +VLLM_API_KEY=9c6dbf44-cef7-43a4-b362-43295b244446 \ +/home/user/vllm/scripts/run-vllm.sh \ +--config ./config.json \ +--tee 8 +``` \ No newline at end of file From 2a064b1d0cfc24b0811ea377a4fa092a88a7a387 Mon Sep 17 00:00:00 2001 From: k3dz0r Date: Thu, 11 Dec 2025 11:19:24 -0300 Subject: [PATCH 3/4] Fix typos --- unsloth/scripts/run-unsloth.sh | 2 +- vllm/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/scripts/run-unsloth.sh b/unsloth/scripts/run-unsloth.sh index c532f479..bc669585 100755 --- a/unsloth/scripts/run-unsloth.sh +++ b/unsloth/scripts/run-unsloth.sh @@ -240,7 +240,7 @@ if [[ -z "${MODEL_RESOURCE:-}" ]]; then MODEL_RESOURCE="none" elif [[ "$MODEL_CHOICE" == "your" ]]; then echo "Provide your model as a resource JSON path, numeric offer id, or folder path" - read -r -p "Model inputc: " MODEL_USER_INPUT || true + read -r -p "Model input: " MODEL_USER_INPUT || true if [[ -n "$MODEL_USER_INPUT" ]]; then if [[ "$MODEL_USER_INPUT" =~ ^[0-9]+$ ]]; then MODEL_RESOURCE="$MODEL_USER_INPUT" diff --git a/vllm/README.md b/vllm/README.md index e89fe376..a1ecedb9 100644 --- a/vllm/README.md +++ b/vllm/README.md @@ -1,6 +1,6 @@ # Super Protocol vLLM -This repository contains the Super Protocol packaging of [vLLM](https://www.vllm.ai/), an inference and serving engine for LLMs. It includes a Dockerfile and helper scripts for running Unsloth workloads on Super Protocol. +This repository contains the Super Protocol packaging of [vLLM](https://www.vllm.ai/), an inference and serving engine for LLMs. It includes a Dockerfile and helper scripts for running vLLM workloads on Super Protocol. The solution allows you to run LLM inference within Super Protocol's Trusted Execution Environment (TEE). From a4e59ff37bbac7a1f0e3100f92b0e06a849b1d19 Mon Sep 17 00:00:00 2001 From: k3dz0r Date: Fri, 30 Jan 2026 09:55:10 -0300 Subject: [PATCH 4/4] Fix broken links and typos --- unsloth/README.md | 4 ++-- vllm/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unsloth/README.md b/unsloth/README.md index 04185340..d2627758 100644 --- a/unsloth/README.md +++ b/unsloth/README.md @@ -2,7 +2,7 @@ This repository contains the Super Protocol packaging of [Unsloth](https://unsloth.ai/), an open-source framework for LLM fine-tuning and reinforcement learning. -The solution allows you to run fine-tuning within Super Protocol's Trusted Execution Environment (TEE). This provides enhanced security and privacy and enables a range of [confidential collaboration](https://docs.develop.superprotocol.com/cli/guides/fine-tune) scenarios. +The solution allows you to run fine-tuning within Super Protocol's Trusted Execution Environment (TEE). This provides enhanced security and privacy and enables a range of [confidential collaboration](https://docs.superprotocol.com/cli/guides/multi-party-collab) scenarios. The repository includes a Dockerfile and a helper script `run-unsloth.sh` that facilitates workflow creation. Note that `run-unsloth.sh` does not build an image and instead uses a pre-existing solution offer. @@ -10,7 +10,7 @@ The repository includes a Dockerfile and a helper script `run-unsloth.sh` that f ### Prerequisites -- [SPCTL](https://docs.develop.superprotocol.com/cli/): Super Protocol CLI tool and its configuration file (`config.json`). +- [SPCTL](https://docs.superprotocol.com/cli/): Super Protocol CLI tool and its configuration file (`config.json`). - BNB and SPPI tokens (opBNB) to pay for transactions and orders. Copy SPCTL’s binary and `config.json` to the `unsloth/scripts` directory inside the cloned Super-Protocol/solutions repository. diff --git a/vllm/README.md b/vllm/README.md index a1ecedb9..fb196c38 100644 --- a/vllm/README.md +++ b/vllm/README.md @@ -10,7 +10,7 @@ The repository includes a Dockerfile and a helper script `run-vllm.sh` that faci ### Prerequisites -- [SPCTL](https://docs.develop.superprotocol.com/cli/): Super Protocol CLI tool and its configuration file (`config.json`). +- [SPCTL](https://docs.superprotocol.com/cli/): Super Protocol CLI tool and its configuration file (`config.json`). - BNB and SPPI tokens (opBNB) to pay for transactions and orders. Copy SPCTL’s binary and `config.json` to the `vllm/scripts` directory inside the cloned Super-Protocol/solutions repository.