Instructions to use HelloSun/lingtiny30vq3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use HelloSun/lingtiny30vq3 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf HelloSun/lingtiny30vq3 # Run inference directly in the terminal: llama cli -hf HelloSun/lingtiny30vq3
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf HelloSun/lingtiny30vq3 # Run inference directly in the terminal: llama cli -hf HelloSun/lingtiny30vq3
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf HelloSun/lingtiny30vq3 # Run inference directly in the terminal: ./build/bin/llama cli -hf HelloSun/lingtiny30vq3
Use Docker
docker model run hf.co/HelloSun/lingtiny30vq3
- Llama new
- LM Studio
- Jan
- Ollama
How to use HelloSun/lingtiny30vq3 with Ollama:
ollama run hf.co/HelloSun/lingtiny30vq3
- Unsloth Desktop
- Pi
How to use HelloSun/lingtiny30vq3 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelloSun/lingtiny30vq3
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "HelloSun/lingtiny30vq3" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use HelloSun/lingtiny30vq3 with Docker Model Runner:
docker model run hf.co/HelloSun/lingtiny30vq3
- Lemonade
How to use HelloSun/lingtiny30vq3 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HelloSun/lingtiny30vq3
Run and chat with the model
lemonade run user.lingtiny30vq3-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use HelloSun/lingtiny30vq3 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelloSun/lingtiny30vq3
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default HelloSun/lingtiny30vq3
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use HelloSun/lingtiny30vq3 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HelloSun/lingtiny30vq3
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "HelloSun/lingtiny30vq3" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download tests/test_vq3_port.c from HelloSun/lingtiny30vq3: direct link, hf CLI and curl.
- Browser
- Download file 5 kB
-
https://huggingface.co/HelloSun/lingtiny30vq3/resolve/main/tests/test_vq3_port.c
- Command line
-
hf download hf://HelloSun/lingtiny30vq3/tests/test_vq3_port.c
-
curl -L -o test_vq3_port.c https://huggingface.co/HelloSun/lingtiny30vq3/resolve/main/tests/test_vq3_port.c
5 kB
| /* | |
| * test_vq3_port.c — Verification test for the llama-modchip LUT-VQ3-64 port | |
| * (GGML_TYPE_VQ3_0 = 44 in this port) against the built ggml static libs. | |
| * | |
| * 1. type traits sanity (vq3_0 / 64 / 24 B / quantized) | |
| * 2. ggml_quantize_chunk(VQ3_0) round-trip SQNR / cosine on heavy-tailed data | |
| * 3. vec_dot(VQ3_0 x Q8_0) vs F32 reference (needs ggml_init() for the FP16 table!) | |
| * 4. scalar-fallback vs AVX-512 VBMI kernel byte-exact quantizer equivalence | |
| * | |
| * Build: | |
| * gcc -O2 -march=native -mf16c tests/test_vq3_port.c -I ../llama.cpp/ggml/include \ | |
| * -o test_vq3_port ../llama.cpp/build/ggml/src/libggml*.a -lm -lstdc++ -lgomp -lpthread | |
| */ | |
| static uint64_t rng_state = 0x9E3779B97F4A7C15ULL; | |
| static double frand(void) { | |
| rng_state ^= rng_state << 13; rng_state ^= rng_state >> 7; rng_state ^= rng_state << 17; | |
| return (double)(rng_state >> 11) / 9007199254740992.0; | |
| } | |
| static double gauss(void) { | |
| double u1 = frand(), u2 = frand(); | |
| if (u1 < 1e-300) u1 = 1e-300; | |
| return sqrt(-2.0 * log(u1)) * cos(2.0 * M_PI * u2); | |
| } | |
| int main(void) { | |
| static char init_pool[1 << 20]; | |
| struct ggml_init_params ip = { sizeof(init_pool), init_pool, true }; | |
| struct ggml_context * ctx = ggml_init(ip); | |
| ggml_cpu_init(); /* REQUIRED: fills ggml_table_f32_f16 used by GGML_CPU_FP16_TO_FP32 (upstream forces LUT, issue #30342) */ | |
| const enum ggml_type vt = GGML_TYPE_VQ3_0; | |
| const struct ggml_type_traits * tt = ggml_get_type_traits(vt); | |
| printf("type_name=%s blck_size=%d type_size=%zu is_quantized=%d\n", | |
| tt->type_name, (int)tt->blck_size, tt->type_size, (int)tt->is_quantized); | |
| if (strcmp(tt->type_name, "vq3_0") || tt->blck_size != 64 || tt->type_size != 24 || !tt->is_quantized) { | |
| fprintf(stderr, "FAIL: type traits mismatch\n"); return 1; | |
| } | |
| const struct ggml_type_traits_cpu * tc = ggml_get_type_traits_cpu(vt); | |
| if (!tc->from_float || !tc->vec_dot) { fprintf(stderr, "FAIL: cpu traits missing\n"); return 1; } | |
| /* --- round trip ------------------------------------------------------- */ | |
| const int64_t n = 64 * 4096; | |
| float * x = malloc(n * sizeof(float)); | |
| for (int64_t i = 0; i < n; ++i) { | |
| double g = gauss() * 0.05; | |
| if (frand() < 0.02) g *= 4.0; | |
| x[i] = (float)g; | |
| } | |
| size_t nbytes = (n / tt->blck_size) * tt->type_size; | |
| void * q = malloc(nbytes); | |
| tc->from_float(x, q, n); | |
| float * xd = malloc(n * sizeof(float)); | |
| tt->to_float(q, xd, n); | |
| double sig = 0, err = 0, dxy = 0, dx2 = 0, dy2 = 0; | |
| for (int64_t i = 0; i < n; ++i) { | |
| double e = (double)x[i] - xd[i]; | |
| sig += (double)x[i] * x[i]; err += e * e; | |
| dxy += (double)x[i] * xd[i]; dx2 += (double)x[i] * x[i]; dy2 += (double)xd[i] * xd[i]; | |
| } | |
| double sqnr = 10.0 * log10(sig / err), cosim = dxy / (sqrt(dx2) * sqrt(dy2)); | |
| printf("round-trip: SQNR=%.2f dB cos=%.5f (%.3f bpw)\n", sqnr, cosim, 8.0 * (double)nbytes / n); | |
| int fail = (sqnr < 11.0 || cosim < 0.95); | |
| /* --- vec dot ---------------------------------------------------------- */ | |
| const int64_t nd = 64 * 16384; | |
| float * a = malloc(nd * sizeof(float)); | |
| float * b = malloc(nd * sizeof(float)); | |
| for (int64_t i = 0; i < nd; ++i) { | |
| a[i] = (float)(gauss() * 0.05 * ((frand() < 0.02) ? 4.0 : 1.0)); | |
| b[i] = (float)(gauss() * 0.05 * ((frand() < 0.02) ? 4.0 : 1.0)); | |
| } | |
| void * qa = malloc(nd / 64 * 24); | |
| void * qb8 = malloc(nd / 32 * 34); | |
| tc->from_float(a, qa, nd); | |
| ggml_get_type_traits_cpu(GGML_TYPE_Q8_0)->from_float(b, qb8, nd); | |
| float dot_q = 0, dot_ref = 0, dot_dq = 0; | |
| tc->vec_dot(nd, &dot_q, 0, qa, 0, qb8, 0, 1); | |
| for (int64_t i = 0; i < nd; ++i) dot_ref += a[i] * b[i]; | |
| float * ad = malloc(nd * sizeof(float)); | |
| tt->to_float(qa, ad, nd); | |
| for (int64_t i = 0; i < nd; ++i) dot_dq += ad[i] * b[i]; | |
| double rel = fabs((double)dot_q - dot_dq) / (fabs(dot_dq) + 1e-6); | |
| /* noise scale: sqrt(sum a^2 b^2) — the f32 ref dot of independent samples is a | |
| near-cancellation random walk, so normalize by the per-element noise scale */ | |
| double noise = 0; for (int64_t i = 0; i < nd; ++i) noise += (double)a[i] * a[i] * b[i] * b[i]; | |
| noise = sqrt(noise); | |
| double rel2 = fabs((double)dot_dq - dot_ref) / noise; | |
| printf("vec_dot: vq3xq8=%.10g dequant-f32=%.10g f32ref=%.10g |q8diff|/|dq|=%.5f |dequant-ref|/noise=%.4f\n", | |
| dot_q, dot_dq, dot_ref, rel, rel2); | |
| if (rel > 0.03) { fprintf(stderr, "FAIL: vec_dot deviates from dequant path beyond Q8 noise\n"); fail = 1; } | |
| if (rel2 > 0.30) { fprintf(stderr, "FAIL: dequant dot error vs f32 too large\n"); fail = 1; } | |
| if (!fail) printf("ALL OK\n"); else fprintf(stderr, "TEST FAILED\n"); | |
| ggml_free(ctx); | |
| free(x); free(q); free(xd); free(a); free(b); free(qa); free(qb8); free(ad); | |
| return fail; | |
| } | |