Spaces:
Running
Running
Serve Humanlike Gemma: model gemma-4-31b-humanlike-chat, thinking on/off, title Humanlike Chat
Browse files- README.md +6 -10
- index.html +11 -16
README.md
CHANGED
|
@@ -1,27 +1,23 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
colorFrom: indigo
|
| 4 |
colorTo: pink
|
| 5 |
sdk: static
|
| 6 |
app_file: index.html
|
| 7 |
pinned: false
|
| 8 |
fullWidth: true
|
| 9 |
-
short_description: Chat with the hosted
|
| 10 |
-
models:
|
| 11 |
-
- LessThanThreeAI/Qwen3.8-27B-Humanlike-Chat-GGUF
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
Static chat client for the hosted OpenAI-compatible endpoint at `https://api.lessthanthreeai.com/v1`.
|
| 17 |
|
| 18 |
-
- Model: `
|
| 19 |
- No API key required
|
| 20 |
- Optional system prompt for a persona, setting, or relationship, kept in the browser between reloads
|
| 21 |
-
-
|
| 22 |
- One conversation per page load; refreshing starts a new session
|
| 23 |
- Requests send only `model`, `messages`, `stream`, `max_tokens`, and `chat_template_kwargs`, so the endpoint defaults match the deployment gate
|
| 24 |
|
| 25 |
-
The service runs on scale-to-zero capacity. The first message after an idle period can take
|
| 26 |
-
|
| 27 |
-
See the [model card](https://huggingface.co/LessThanThreeAI/Qwen3.8-27B-Humanlike-Chat-GGUF) for the artifacts and the [serving configuration](https://huggingface.co/LessThanThreeAI/Qwen3.8-27B-Humanlike-Chat-GGUF/blob/main/SERVING.md) for the engine setup.
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Humanlike Chat
|
| 3 |
colorFrom: indigo
|
| 4 |
colorTo: pink
|
| 5 |
sdk: static
|
| 6 |
app_file: index.html
|
| 7 |
pinned: false
|
| 8 |
fullWidth: true
|
| 9 |
+
short_description: Chat with the hosted Humanlike model.
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Humanlike Chat
|
| 13 |
|
| 14 |
Static chat client for the hosted OpenAI-compatible endpoint at `https://api.lessthanthreeai.com/v1`.
|
| 15 |
|
| 16 |
+
- Model: `gemma-4-31b-humanlike-chat`
|
| 17 |
- No API key required
|
| 18 |
- Optional system prompt for a persona, setting, or relationship, kept in the browser between reloads
|
| 19 |
+
- Thinking: off (default) or on
|
| 20 |
- One conversation per page load; refreshing starts a new session
|
| 21 |
- Requests send only `model`, `messages`, `stream`, `max_tokens`, and `chat_template_kwargs`, so the endpoint defaults match the deployment gate
|
| 22 |
|
| 23 |
+
The service runs on scale-to-zero capacity. The first message after an idle period can take a few minutes while a worker starts, and the request stays connected while that happens. Later messages are fast until the worker shuts down after five idle minutes.
|
|
|
|
|
|
index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
-
<title>
|
| 7 |
<style>
|
| 8 |
* { box-sizing: border-box; }
|
| 9 |
body {
|
|
@@ -137,10 +137,9 @@
|
|
| 137 |
<body>
|
| 138 |
<main>
|
| 139 |
<header>
|
| 140 |
-
<h1>
|
| 141 |
<p>
|
| 142 |
Live demo of the hosted endpoint <code>https://api.lessthanthreeai.com/v1</code>.
|
| 143 |
-
<a href="https://huggingface.co/LessThanThreeAI/Qwen3.8-27B-Humanlike-Chat-GGUF">Model card</a>
|
| 144 |
</p>
|
| 145 |
<details>
|
| 146 |
<summary>Settings</summary>
|
|
@@ -150,12 +149,10 @@
|
|
| 150 |
placeholder="Optional. Sets identity, setting, or relationship for the conversation."></textarea>
|
| 151 |
</div>
|
| 152 |
<div class="field">
|
| 153 |
-
<label for="reasoning">
|
| 154 |
<select id="reasoning">
|
| 155 |
<option value="off">Off (fastest, the default)</option>
|
| 156 |
-
<option value="
|
| 157 |
-
<option value="medium">Medium</option>
|
| 158 |
-
<option value="xhigh">Extra high</option>
|
| 159 |
</select>
|
| 160 |
</div>
|
| 161 |
</details>
|
|
@@ -173,9 +170,9 @@
|
|
| 173 |
|
| 174 |
<script>
|
| 175 |
const API = "https://api.lessthanthreeai.com/v1";
|
| 176 |
-
const MODEL = "
|
| 177 |
-
const INTRO = "Say something. The first reply can take a
|
| 178 |
-
const MAX_TOKENS = { off: 512,
|
| 179 |
|
| 180 |
const chat = document.querySelector("#chat");
|
| 181 |
const form = document.querySelector("#form");
|
|
@@ -189,9 +186,9 @@
|
|
| 189 |
const messages = [];
|
| 190 |
|
| 191 |
system.value = localStorage.getItem("systemPrompt") || "";
|
| 192 |
-
reasoning.value = localStorage.getItem("
|
| 193 |
system.addEventListener("input", () => localStorage.setItem("systemPrompt", system.value));
|
| 194 |
-
reasoning.addEventListener("change", () => localStorage.setItem("
|
| 195 |
|
| 196 |
function addMessage(role, text) {
|
| 197 |
const element = document.createElement("div");
|
|
@@ -259,7 +256,7 @@
|
|
| 259 |
prompt.value = "";
|
| 260 |
send.disabled = true;
|
| 261 |
status.classList.add("busy");
|
| 262 |
-
status.textContent = "Starting the model. A cold start
|
| 263 |
|
| 264 |
const target = addAssistantMessage();
|
| 265 |
const effort = reasoning.value;
|
|
@@ -269,9 +266,7 @@
|
|
| 269 |
? [{ role: "system", content: systemPrompt }, ...messages]
|
| 270 |
: messages;
|
| 271 |
|
| 272 |
-
const chatTemplateKwargs = effort === "
|
| 273 |
-
? { enable_thinking: false, preserve_thinking: false }
|
| 274 |
-
: { enable_thinking: true, reasoning_effort: effort, preserve_thinking: false };
|
| 275 |
|
| 276 |
try {
|
| 277 |
const response = await fetch(`${API}/chat/completions`, {
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
+
<title>Humanlike Chat</title>
|
| 7 |
<style>
|
| 8 |
* { box-sizing: border-box; }
|
| 9 |
body {
|
|
|
|
| 137 |
<body>
|
| 138 |
<main>
|
| 139 |
<header>
|
| 140 |
+
<h1>Humanlike Chat</h1>
|
| 141 |
<p>
|
| 142 |
Live demo of the hosted endpoint <code>https://api.lessthanthreeai.com/v1</code>.
|
|
|
|
| 143 |
</p>
|
| 144 |
<details>
|
| 145 |
<summary>Settings</summary>
|
|
|
|
| 149 |
placeholder="Optional. Sets identity, setting, or relationship for the conversation."></textarea>
|
| 150 |
</div>
|
| 151 |
<div class="field">
|
| 152 |
+
<label for="reasoning">Thinking</label>
|
| 153 |
<select id="reasoning">
|
| 154 |
<option value="off">Off (fastest, the default)</option>
|
| 155 |
+
<option value="on">On</option>
|
|
|
|
|
|
|
| 156 |
</select>
|
| 157 |
</div>
|
| 158 |
</details>
|
|
|
|
| 170 |
|
| 171 |
<script>
|
| 172 |
const API = "https://api.lessthanthreeai.com/v1";
|
| 173 |
+
const MODEL = "gemma-4-31b-humanlike-chat";
|
| 174 |
+
const INTRO = "Say something. The first reply can take a few minutes while the inference worker starts.";
|
| 175 |
+
const MAX_TOKENS = { off: 512, on: 4096 };
|
| 176 |
|
| 177 |
const chat = document.querySelector("#chat");
|
| 178 |
const form = document.querySelector("#form");
|
|
|
|
| 186 |
const messages = [];
|
| 187 |
|
| 188 |
system.value = localStorage.getItem("systemPrompt") || "";
|
| 189 |
+
reasoning.value = localStorage.getItem("thinking") === "on" ? "on" : "off";
|
| 190 |
system.addEventListener("input", () => localStorage.setItem("systemPrompt", system.value));
|
| 191 |
+
reasoning.addEventListener("change", () => localStorage.setItem("thinking", reasoning.value));
|
| 192 |
|
| 193 |
function addMessage(role, text) {
|
| 194 |
const element = document.createElement("div");
|
|
|
|
| 256 |
prompt.value = "";
|
| 257 |
send.disabled = true;
|
| 258 |
status.classList.add("busy");
|
| 259 |
+
status.textContent = "Starting the model. A cold start can take a few minutes.";
|
| 260 |
|
| 261 |
const target = addAssistantMessage();
|
| 262 |
const effort = reasoning.value;
|
|
|
|
| 266 |
? [{ role: "system", content: systemPrompt }, ...messages]
|
| 267 |
: messages;
|
| 268 |
|
| 269 |
+
const chatTemplateKwargs = { enable_thinking: effort === "on", preserve_thinking: false };
|
|
|
|
|
|
|
| 270 |
|
| 271 |
try {
|
| 272 |
const response = await fetch(`${API}/chat/completions`, {
|