JamjuriEdge — from Chevalabs

Jamjuri Edge

Experimental 4B edge model family for local, offline, and tool-driven workloads.

Series: part of JamjuriEDGE (4B)collection · series card

Jamjuri Edge is a family of compact 4B models designed for practical local AI: Thai + English, coding, calculation, instruction following, tool calling, IoT automation, and offline agent workflows.

This release does not hide the trade-offs behind a single "best" checkpoint. We release the core model, the raw specialist adapters, and multiple TIES-merged candidates so users can choose — or build their own.

Part of the JamjuriEDGE series — series card: Cheva123/JamjuriEDGE · collection


✦ English

Highlights

  • 4B parameters
  • Based on Qwen3-4B-Instruct-2507
  • Non-thinking model
  • Thai + English
  • Local / offline focused
  • Function calling & tool use
  • Python / coding
  • IoT / automation
  • Multiple TIES merge candidates
  • Raw LoRA expert adapters released separately (adapters repo)

Benchmarks at a glance — BF16, one evaluation stack

Evaluated with vLLM on A100, full tier. Baseline = Stage 1 (the shared parent).

Model IFEval-TH GSM8K BFCL IoT HumanEval
Stage1 72.56 93.18 86.83 30.33 81.10
TIES-452530 73.95 93.25 86.04 36.67 84.76
TIES-402535 75.81 93.48 85.68 35.67 83.54
TIES-352540 75.81 92.87 84.76 35.00 84.76
Qwen3-4B-Instruct-2507 (upstream base) 72.56 92.80 86.98 30.33 81.10
Typhoon2.5-Qwen3-4B 73.02 93.33 71.22 27.67 81.71

Italic rows = external reference models (different lineage), measured in the same round with the same runner/infra.

No single model is presented as the universal winner. Each candidate is a different point on the capability trade-off frontier: 452530 leads IoT / HumanEval and BFCL, 402535 leads IFEval-TH / GSM8K, 352540 is code-heavier. Additional experimental candidates (452035, 402040, 353035, 303535) and full reports live in benchmarks/.

All numbers come from the same BF16 A100 evaluation infrastructure used across the family.

Why Jamjuri Edge?

Cloud models are powerful, but many real workloads live somewhere the cloud cannot easily reach:

  • local files
  • internal tools
  • PLC / IoT devices
  • private company data
  • offline or air-gapped systems
  • low-latency edge deployments

Jamjuri Edge explores how much practical capability can fit into a small, locally deployable model.

Model Architecture

Qwen3-4B-Instruct-2507
        │
        ▼
Stage 1 — R64 Primitive Core
        │
        ├────────────┬────────────┐
        ▼            ▼            ▼
   Control R16    Math R16     Code R16
        │            │            │
        └────────────┼────────────┘
                     ▼
                 TIES Merge
                     │
                     ▼
              Jamjuri Edge V4

Training Philosophy

Stage 1 — Primitive Core

Broad, easy-to-medium, high-diversity training (LoRA r=64, α=128).

Focus: Thai / bilingual interaction · basic Python · basic coding · instruction following · simple tool calls · abstention / no-tool behavior · general capability preservation.

The goal of Stage 1 is not benchmark maximization. The goal is:

Build a stable foundation without destroying the base model.

Stage 2 — Extreme Experts

Three independent LoRA experts (r=16, α=32) trained from the same Stage 1 parent, with assistant-only loss (official Qwen3 chat template, exact token offsets) and token-budget batching:

  • Control Expert — IFEval-TH · BFCL · IoT / tool restraint · exact output formats · abstention
  • Math Expert — GSM8K · numerical reasoning · Python calculation · output discipline
  • Code Expert — HumanEval · function completion · debugging · algorithmic coding · spec following

Stage 3 — TIES Merging

Instead of naïvely averaging expert weights, Jamjuri Edge V4 uses TIES to reduce destructive interference between specialist task vectors:

W_final = W_parent + λ · TIES( w1·ΔE1, w2·ΔE2, w3·ΔE3 ), Δ = (B @ A) × (α / r), λ = 1.0, density = 0.5

We release multiple merge ratios because no single checkpoint dominates every workload.

Released Models

Model Control Math Code Character
Stage1 (parents/jamjuri-edge-v4-stage1) Core / reference
TIES-452530 45% 25% 30% Tool / IoT balanced
TIES-402535 40% 25% 35% Instruction / math balanced
TIES-352540 35% 25% 40% Code heavier
… (benchmarks/) Experimental candidates

Which Model Should I Use?

  • TIES-452530 — IoT · local agents · automation · tool-heavy workloads (best overall avg 74.93)
  • TIES-402535 — Thai instruction following · general use · calculation · balanced technical work (best IFEval-TH / GSM8K)
  • TIES-352540 — coding-heavy experiments (best HumanEval)

Expert Adapters

The raw Stage-2 expert adapters (E1/E2/E3) plus the Stage-1 adapter live in a companion repo: Cheva123/Jamjuri-EDGE-Preview-100-adapters

Researchers can create their own: linear merges · TIES merges · DARE-TIES merges · custom expert ratios · custom global lambda.

Repository layout

candidates/          # TIES-402535 · TIES-352540  (merged BF16)  ·  TIES-452530 = repo root
parents/             # jamjuri-edge-v4-stage1 (merged BF16) + curriculum_manifest.json
recipes/             # training engine, TIES merger, preflight, dataset builder
benchmarks/          # round 1 + round 2 reports, scores_all_candidates.csv
# LoRA adapters (E1/E2/E3 + Stage-1) → Cheva123/Jamjuri-EDGE-Preview-100-adapters

Usage

Transformers

# Merged candidate (self-contained)
from transformers import AutoModelForCausalLM, AutoTokenizer
sub = None  # TIES-452530 = repo root (ย้ายขึ้น root แล้ว)
model = AutoModelForCausalLM.from_pretrained("Cheva123/Jamjuri-EDGE-Preview-100", subfolder=sub,
                                             dtype="bfloat16", device_map="auto")
tok = AutoTokenizer.from_pretrained("Cheva123/Jamjuri-EDGE-Preview-100", subfolder=sub)

# LoRA adapters (E1/E2/E3 + Stage-1) — companion repo:
#   https://huggingface.co/Cheva123/Jamjuri-EDGE-Preview-100-adapters
from peft import PeftModel
parent = AutoModelForCausalLM.from_pretrained("Cheva123/Jamjuri-EDGE-Preview-100",
                                              subfolder="parents/jamjuri-edge-v4-stage1",
                                              dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(parent, "Cheva123/Jamjuri-EDGE-Preview-100-adapters",
                                  subfolder="e1").merge_and_unload()

llama.cpp / GGUF

# Stage-1 Q8_0 GGUF (jamjuri_edge_v4_stage1_q8_0.gguf) — available on request
# Candidate GGUF (Q8_0 / Q6_K / Q5_K_M / Q4_K_M) — planned
llama-cli -m jamjuri_edge_v4_stage1_q8_0.gguf -p "สวัสดีครับ" -ngl 99

Tool Calling

<|im_start|>system
You are Jamjuri Edge. Use the provided tools when needed; otherwise answer directly.<|im_end|>
<|im_start|>user
เปิดไฟในห้องนั่งเล่น<|im_end|>
<|im_start|>assistant
<tool_call>{"name": "iot_control", "arguments": {"device": "living_room_light", "action": "on"}}</tool_call><|im_end|>

Quantization

Available / planned:

  • BF16 (released: Stage 1 + all candidates)
  • GGUF Q8_0 (Stage 1 available; candidates planned)
  • Q6_K · Q5_K_M · Q4_K_M (planned)

Benchmark scores in this README refer to BF16 unless explicitly stated otherwise.

Dataset & Evaluation Integrity

Benchmark evaluation sets are kept separate from training data. Benchmark failure patterns may be used to design new analogous training examples, but exact evaluation samples are not intentionally included in training. Dataset diversity, deduplication, and task-family separation are treated as part of the training recipe.

Training data: Cheva123/jamjuri-edge-v4-stage2-datasets (Stage-1 curriculum + E1/E2/E3).

Known Limitations

Jamjuri Edge is experimental. Known weaknesses include:

  • BFCL can regress slightly after some TIES merges
  • complex multi-device IoT remains difficult
  • invalid attribute grounding remains difficult
  • small changes in merge ratios can change behavior
  • specialist adapters may introduce output-style bias
  • 4B capacity creates real trade-offs between capabilities

Jamjuri Edge Is an Experiment

We trained it pretty hard. Most of the base capability survived. Some capabilities improved. Some moved sideways. And some depend strangely on how the expert vectors are merged.

That is why we are releasing the candidates and adapters rather than pretending there is one perfect checkpoint.

Jamjuri Edge is not released because we know exactly what it can do. It is released because we want to find out.

Reproducibility

  • exact base model revision — Qwen3-4B-Instruct-2507
  • dataset revisions — Cheva123/jamjuri-edge-v4-stage2-datasets (v1.0 certified) + Stage-1 manifest
  • LoRA configuration — Stage 1: r=64, α=128; Stage 2: r=16, α=32, 7 modules, dropout 0
  • Stage 1 / Stage 2 training configuration — recipes/stage2_train.py + per-expert train_report.json (in the adapters repo)
  • TIES density 0.5, lambda 1.0, merge ratios — in each candidate's ties_manifest.json
  • tokenizer / chat template — official Qwen3 Instruct-2507 (non-thinking)
  • benchmark runner — Cheva Universal Benchmark (vLLM, A100 BF16), reports in benchmarks/
  • evaluation prompts — kept with the runner on the Cheva side

Future Work

  • JamjuriEDGE-IOT
  • stronger BFCL / IoT specialization
  • DARE-TIES experiments
  • additional quantizations
  • real-world agent benchmarks
  • community merge experiments

License

apache-2.0 — model weights and code in this repository. Datasets follow their own sources' terms (see the datasets repo cards/reports).

Citation

@misc{jamjuri_edge_v4,
  title  = {Jamjuri Edge V4 — 4B Edge Model Family (Stage-1 core, expert adapters, TIES candidates)},
  author = {Chevalabs},
  year   = {2026},
  url    = {https://huggingface.co/Cheva123/Jamjuri-EDGE-Preview-100}
}

Acknowledgements

Qwen · Hugging Face · PEFT · Unsloth · benchmark / dataset authors · community testers


✦ ภาษาไทย

Jamjuri Edge คืออะไร?

Jamjuri Edge คือครอบครัวโมเดล 4B ที่ทำไว้ใช้งานจริงในเครื่อง — ไทย+อังกฤษ, เขียนโค้ด, คิดเลข, ทำตามคำสั่ง, เรียก tool, งาน IoT/automation และ agent ที่รันแบบออฟไลน์

รอบนี้เราไม่ปล่อยเป็น checkpoint เดียวจบ แต่ให้เลือกครบชุด: ตัว core, adapter ผู้เชี่ยวชาญแบบดิบ และ candidate ที่ merge ด้วย TIES หลายสูตร — จะเลือกใช้ตัวที่ใช่ หรือเอา adapter ไป merge เองก็ได้

อยู่ในซีรีส์ JamjuriEDGE — การ์ดซีรีส์: Cheva123/JamjuriEDGE · คอลเลกชัน

จุดเด่น

  • ขนาด 4B · ต่อยอดจาก Qwen3-4B-Instruct-2507 · โหมด non-thinking
  • ไทย + อังกฤษ
  • เน้นรันในเครื่อง / ออฟไลน์
  • เรียก function / tool ได้
  • เขียน Python / โค้ดได้
  • งาน IoT / automation
  • มี TIES candidates ให้เลือกหลายสูตร
  • แถม adapter ผู้เชี่ยวชาญ (แบบดิบ) — ปล่อยใน adapters repo แยกต่างหาก

คะแนน benchmark (BF16 — วัดด้วยชุดเดียวกันทั้งหมด)

โมเดล IFEval-TH GSM8K BFCL IoT HumanEval
Stage1 72.56 93.18 86.83 30.33 81.10
TIES-452530 73.95 93.25 86.04 36.67 84.76
TIES-402535 75.81 93.48 85.68 35.67 83.54
TIES-352540 75.81 92.87 84.76 35.00 84.76
Qwen3-4B-Instruct-2507 (base ต้นทาง) 72.56 92.80 86.98 30.33 81.10
Typhoon2.5-Qwen3-4B 73.02 93.33 71.22 27.67 81.71

แถวตัวเอียง = โมเดลอ้างอิงภายนอก (คนละสาย) วัดในรอบเดียวกันด้วย runner/เครื่องชุดเดียวกัน

ไม่มีตัวไหนเก่งทุกด้าน — แต่ละ candidate อยู่คนละจุดของ trade-off: 452530 เก่ง IoT / HumanEval และ BFCL, 402535 เก่ง IFEval-TH / GSM8K, 352540 หนักไปทางโค้ด ยังมี candidate ทดลองอีก 4 ตัว (452035, 402040, 353035, 303535) — ดูรายงานเต็มใน benchmarks/

ทำไมต้อง Jamjuri Edge?

โมเดลคลาวด์เก่งก็จริง แต่มีงานอีกเยอะที่ขึ้นคลาวด์ไม่ได้ — ไฟล์ในเครื่อง, เครื่องมือภายในบริษัท, อุปกรณ์ PLC/IoT, ข้อมูลบริษัท, ระบบออฟไลน์/air-gapped หรือเครื่อง edge ที่ต้องตอบไว Jamjuri Edge เกิดจากคำถามที่ว่า "เราจะยัดความสามารถที่ใช้งานได้จริงเข้าโมเดล 4B ได้มากขนาดไหน"

โครงสร้างโมเดล

Qwen3-4B-Instruct-2507
        │
        ▼
Stage 1 — Primitive Core (R64)
        │
        ├────────────┬────────────┐
        ▼            ▼            ▼
   Control R16    Math R16     Code R16
        │            │            │
        └────────────┼────────────┘
                     ▼
                 TIES Merge
                     │
                     ▼
              Jamjuri Edge V4

แนวคิดการเทรน

Stage 1 — Primitive Core (LoRA r=64, α=128) เทรนกว้างๆ ระดับง่ายถึงกลาง ให้ข้อมูลหลากหลาย: ไทย/สองภาษา, Python พื้นฐาน, ทำตามคำสั่ง, tool ง่ายๆ, รู้จัก "ไม่เรียก tool" เมื่อไม่ควร และรักษาความเก่งเดิมของ base ไว้ Stage 1 ไม่ได้มีเป้าหมายเพื่อปั๊มคะแนน benchmark แต่เพื่อ ทำฐานให้แน่นโดยไม่ทำให้ base พัง

Stage 2 — Expert 3 ตัว (LoRA r=16, α=32 จาก parent เดียวกัน) คิด loss เฉพาะคำตอบของ assistant (ใช้ chat template ทางการ Qwen3 + token offset ตรงตำแหน่ง) และจัด batch ตามจำนวนโทเคน (token-budget) เพื่อกัน OOM

  • Control → IFEval-TH · BFCL · งาน IoT / คุมการใช้ tool · รูปแบบผลลัพธ์เป๊ะ · รู้จักหยุดเมื่อไม่ควรตอบ
  • Math → GSM8K · คิดเลขเป็นเหตุเป็นผล · คำนวณด้วย Python · ตอบให้เป็นระเบียบ
  • Code → HumanEval · เติมฟังก์ชัน · debug · โค้ดเชิงอัลกอริทึม · ทำตามสเปก

Stage 3 — รวมร่างด้วย TIES แทนที่จะเอาถ่วงน้ำหนักมาบวกลบกันตรงๆ เราใช้ TIES เพื่อลดการตีกันของ task vector ของแต่ละ expert: W_final = W_parent + λ · TIES( w1·ΔE1, w2·ΔE2, w3·ΔE3 ), Δ = (B @ A) × (α / r), λ = 1.0, density = 0.5 เราปล่อยหลาย ratio เพราะไม่มีสูตรไหนชนะทุกงาน

โมเดลในรอบนี้

โมเดล Control Math Code ลักษณะ
Stage1 (parents/jamjuri-edge-v4-stage1) Core / ตัวอ้างอิง
TIES-452530 45% 25% 30% สมดุลงาน tool / IoT
TIES-402535 40% 25% 35% สมดุลงานตามคำสั่ง / คณิต
TIES-352540 35% 25% 40% หนักไปทางโค้ด
… (benchmarks/) candidate ทดลอง

ใช้ตัวไหนดี?

  • TIES-452530 — งาน IoT · agent ในเครื่อง · automation · งานที่ใช้ tool เยอะ (ค่าเฉลี่ยรวมดีสุด 74.93)
  • TIES-402535 — งานทำตามคำสั่งภาษาไทย · ใช้งานทั่วไป · คำนวณ · งานเทคนิคแบบสมดุล (IFEval-TH / GSM8K ดีสุด)
  • TIES-352540 — สายโค้ด / งานทดลองที่เน้นเขียนโปรแกรม (HumanEval ดีสุด)

Adapter ผู้เชี่ยวชาญ

adapter ดิบของ Stage 2 (E1/E2/E3) และของ Stage 1 อยู่ใน repo แยก: Cheva123/Jamjuri-EDGE-Preview-100-adapters — เอาไปทำ merge เองได้ตามใจ ทั้งแบบ linear, TIES, DARE-TIES หรือปรับ ratio / lambda เอง

ใน repo นี้มีอะไร

candidates/          # TIES-402535 · TIES-352540 (merged BF16)  ·  TIES-452530 = repo root
parents/             # Stage-1 merged BF16 + curriculum_manifest.json
recipes/             # สคริปต์เทรน · TIES merger · preflight · dataset builder
benchmarks/          # รายงานรอบ 1+2 · scores_all_candidates.csv
# adapter LoRA (E1/E2/E3 + Stage-1) → Cheva123/Jamjuri-EDGE-Preview-100-adapters

วิธีใช้งาน

# Candidate (merged แล้ว — โหลดใช้ได้เลย)
from transformers import AutoModelForCausalLM, AutoTokenizer
sub = None  # TIES-452530 = repo root (ย้ายขึ้น root แล้ว)
model = AutoModelForCausalLM.from_pretrained("Cheva123/Jamjuri-EDGE-Preview-100", subfolder=sub,
                                             dtype="bfloat16", device_map="auto")
tok = AutoTokenizer.from_pretrained("Cheva123/Jamjuri-EDGE-Preview-100", subfolder=sub)

# Adapter (E1/E2/E3 + Stage-1) — repo แยก:
#   https://huggingface.co/Cheva123/Jamjuri-EDGE-Preview-100-adapters
from peft import PeftModel
parent = AutoModelForCausalLM.from_pretrained("Cheva123/Jamjuri-EDGE-Preview-100",
                                              subfolder="parents/jamjuri-edge-v4-stage1",
                                              dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(parent, "Cheva123/Jamjuri-EDGE-Preview-100-adapters",
                                  subfolder="e1").merge_and_unload()
# llama.cpp — ตอนนี้มี GGUF Q8_0 ของ Stage-1 (แจ้งขอได้) ส่วน GGUF ของ candidate กำลังทำ
llama-cli -m jamjuri_edge_v4_stage1_q8_0.gguf -p "สวัสดีครับ" -ngl 99

Quantization

มีแล้ว / กำลังทำ: BF16 (Stage 1 + candidates ครบ) · GGUF Q8_0 (Stage 1 มีแล้ว · candidates กำลังทำ) · Q6_K · Q5_K_M · Q4_K_M (แผน) — คะแนนทั้งหมดในหน้านี้วัดที่ BF16

เรื่องข้อมูลและการประเมิน

  • ชุดข้อสอบกับชุดเทรนแยกกัน ไม่ปนกัน
  • ถ้าโมเดลพลาดแบบไหน เราอาจเอา "แพทเทิร์น" นั้นไปสร้างโจทย์เทรนเพิ่ม — ไม่ได้เอาข้อสอบจริงไปเทรน
  • ความหลากหลาย การ dedup และการแยก task family ถือเป็นส่วนหนึ่งของสูตรเทรน

ข้อมูลเทรน: Cheva123/jamjuri-edge-v4-stage2-datasets

ข้อจำกัด (รู้ไว้ก่อนใช้)

  • BFCL ลดลงเล็กน้อยหลัง merge บางสูตร
  • งาน IoT หลายอุปกรณ์พร้อมกันยังได้คะแนนต่ำกว่าที่เราต้องการมาก
  • grounding attribute ที่ผิดยังเป็นจุดอ่อน
  • เปลี่ยน ratio นิดเดียว พฤติกรรมเปลี่ยนได้
  • adapter ผู้เชี่ยวชาญอาจทำให้สไตล์การตอบเอียงไปทางนั้น
  • ขนาด 4B มี trade-off จริง — เก่งทุกด้านพร้อมกันไม่ได้

Jamjuri Edge เป็นการทดลอง

เราเทรนมันค่อนข้างหนัก ความเก่งเดิมส่วนใหญ่ยังคงไว้ได้ บางอย่างดีขึ้น บางอย่างทรงตัว และบางอย่างก็ขึ้นกับวิธี merge อย่างคาดไม่ถึง เราเลยปล่อยทั้ง candidate และ adapter ให้เลือกเอง ดีกว่าฝืนบอกว่ามี checkpoint เดียวที่เพอร์เฟกต์

Jamjuri Edge ไม่ได้ปล่อยเพราะเรารู้แน่ว่ามันทำได้แค่ไหน แต่ปล่อยเพราะพวกเราอยากรู้ว่า "มันทำได้แค่ไหนกันแน่!"

Reproducibility

  • base model — Qwen3-4B-Instruct-2507
  • dataset — Cheva123/jamjuri-edge-v4-stage2-datasets (v1.0) + manifest ของ Stage 1
  • LoRA — Stage 1: r=64, α=128 · Stage 2: r=16, α=32 (7 โมดูล, dropout 0)
  • สคริปต์/สูตรเทรน — recipes/stage2_train.py
  • TIES — density 0.5 · λ 1.0 · ratio อยู่ใน ties_manifest.json ของแต่ละ candidate
  • tokenizer / chat template — ทางการ Qwen3 (Instruct-2507, non-thinking)
  • benchmark — Cheva Universal Benchmark (vLLM บน A100, BF16) · รายงานใน benchmarks/

แผนต่อไป

JamjuriEDGE-IOT · เก่ง BFCL/IoT ขึ้น · ทดลอง DARE-TIES · เพิ่ม quantizations · benchmark งาน agent จริง · merge ทดลองจากชุมชน

License / Citation / เครดิต

  • License: apache-2.0 (weights + โค้ดใน repo นี้) · datasets ตามเงื่อนไขของแหล่งที่มา
  • Citation: ดู bibtex ด้านบน (EN)
  • เครดิต: Qwen · Hugging Face · PEFT · Unsloth · นักเขียน benchmark/dataset · ชุมชนที่ช่วยทดสอบ
Downloads last month
370
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Cheva123/Jamjuri-EDGE-Preview-100

Adapter
(5707)
this model
Adapters
1 model

Collection including Cheva123/Jamjuri-EDGE-Preview-100