Views
No views yet
<system> / <user> / <assistant> token scheme.| File | Internal version | What it is |
|---|---|---|
chat_template_ling.jinja | ling-fixed | The maintained template — full loop-guard, security hardening, tool + skill integration, developer-role support. Use this. |
chat_template_ling-orig.jinja | ling v3 iteration | The minimal upstream original. Kept for reference/diffing only. |
README.md for the full write-up. In brief, this template adds
over chat_template_laguna-orig.jinja:<available_tools> block with a
suspension notice so the model cannot emit a tool call.$ (shell) and took (timing) false-positive
escapes. Read tools are exempt from error-text matching; results are attributed via
tool_call_id → name.sanitize_tool_tokens strips literal <|think_off|> /
<|think_on|> from untrusted tool output.skill-tool triggering, vanished-tool warnings,
strftime_now date injection, OpenAI {"type":"function",…} wrapper unwrapping,
middle-out tool-response truncation, <__media__> marker stripping, unclosed-reasoning recovery.tool_call_format.<arg_key>/<arg_value> pairs:<tool_call>get_weather<arg_key>location</arg_key><arg_value>NYC</arg_value></tool_call>--chat-template-file at the template and enable --jinja. Example for Laguna S 2.1 APEX:1import os
2import subprocess
3import sys
4
5env = os.environ.copy()
6
7cmd = [
8 r".\llama-server.exe",
9 "-m", r"D:\Ling-3.0-flash-AD-IQ3_S-00001-of-00002.gguf",
10 "--reasoning-preserve",
11 "--reasoning-budget", "16000",
12 "--reasoning-budget-message", "I've thought enough. Answering now with what I have.",
13 "--fit", "on",
14 "--n-cpu-moe", "39",
15 "-lm", "mlock", #recent llama.cpp only ; --mlock & --no-mmap alternative
16 "-c", "120000",
17 "--cache-type-k", "q8_0",
18 "--cache-type-v", "q8_0",
19 "-np", "1",
20 "-fa", "on",
21 "-t", "8",
22 "-tb", "8",
23 "-b", "2048",
24 "-ub", "2048",
25 "--jinja",
26 "-kvu",
27 "--temp", "0.6",
28 "--top-p", "0.95",
29 "--top-k", "20",
30 "--samplers", "top_k;top_p;temperature",
31 "--alias", "laguna-s-2.1",
32 "--cache-reuse", "256",
33 "--cache-ram", "1024",
34 "--host", "127.0.0.1",
35 "--port", "8080",
36 "--verbosity", "4",
37 "--chat-template-file", r"G:\xlam3\chat_template_ling.jinja",
38]
39
40if __name__ == "__main__":
41 try:
42 print("Starting llama-server...")
43 subprocess.run(cmd, env=env, check=True)
44 except KeyboardInterrupt:
45 print("\nServer stopped by user.")
46 except Exception as e:
47 print(f"\nError running server: {e}")
48
49| Role | Author |
|---|---|
| Base model | Poolside (Laguna S 2.1) |
| Template lineage / fixes | froggeric + fork contributors |