Text Generation
GGUF
jev-style
English
decision-model
classification
calibration
qwen3.5
single-prefill
conversational
Instructions to use chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- jev-style
How to use chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF with jev-style:
pip install jev-style # GGUF builds score through llama.cpp: build the jev-score binary once hf download chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF build_jev_score.sh jev_score.cpp --local-dir jev-score export JEV_SCORE_BIN=$(sh jev-score/build_jev_score.sh /path/to/llama.cpp | tail -n 1)
from jev_style import JevStyle, noul, choice js = JevStyle.from_pretrained("chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF") out = js.decide("I was charged twice for one order.", { "billing": noul("This message is about billing."), "team": choice("Which team should handle it?", ["billing", "shipping", "tech"]), }) print(out["answers"]["team"]["choice"]) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF 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 chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
Use Docker
docker model run hf.co/chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
- Ollama
How to use chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF with Ollama:
ollama run hf.co/chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF with Docker Model Runner:
docker model run hf.co/chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
- Lemonade
How to use chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Jev-Style-Qwen3.5-2B-Decision-v2-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download gguf_logits.cpp from chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 3 kB
-
https://huggingface.co/chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF/resolve/main/gguf_logits.cpp
- Command line
-
hf download hf://chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF/gguf_logits.cpp
-
curl -L -o gguf_logits.cpp https://huggingface.co/chaoliangUNSW/Jev-Style-Qwen3.5-2B-Decision-v2-GGUF/resolve/main/gguf_logits.cpp
3 kB
| // Exact next-position option logits. JSONL in/out; no sampling or text decoding. | |
| // Build against the same llama.cpp version used to convert the GGUF. | |
| using json = nlohmann::json; | |
| int main(int argc, char **argv) { | |
| if (argc != 2) { std::cerr << "usage: gguf_logits model.gguf\n"; return 2; } | |
| ggml_backend_load_all(); | |
| llama_backend_init(); | |
| auto mp = llama_model_default_params(); mp.n_gpu_layers = 99; | |
| auto *model = llama_model_load_from_file(argv[1], mp); | |
| if (!model) return 3; | |
| auto cp = llama_context_default_params(); | |
| cp.n_ctx = 2048; cp.n_batch = 1024; cp.n_ubatch = 1024; cp.n_seq_max = 1; | |
| cp.n_threads = 8; cp.n_threads_batch = 8; | |
| auto *ctx = llama_init_from_model(model, cp); | |
| if (!ctx) { llama_model_free(model); return 4; } | |
| auto *vocab = llama_model_get_vocab(model); | |
| std::vector<llama_token> labels; | |
| for (char c = 'A'; c <= 'Z'; ++c) { | |
| std::string label = std::string(" ") + c; | |
| llama_token token[4]; | |
| int n = llama_tokenize(vocab, label.data(), label.size(), token, 4, false, false); | |
| if (n != 1) { std::cerr << "option is not a single token\n"; return 5; } | |
| labels.push_back(token[0]); | |
| } | |
| std::string line; | |
| while (std::getline(std::cin, line)) { | |
| try { | |
| if (line.size() > 200000) throw std::runtime_error("request too large"); | |
| auto in = json::parse(line); | |
| std::string prompt = in.at("prompt").get<std::string>(); | |
| int k = in.at("n_options").get<int>(); | |
| if (k < 2 || k > 26) throw std::runtime_error("need 2-26 options"); | |
| std::vector<llama_token> tokens(1025); | |
| int n = llama_tokenize(vocab, prompt.data(), prompt.size(), tokens.data(), tokens.size(), false, true); | |
| if (n <= 0 || n > 1024) throw std::runtime_error("prompt exceeds the validated context budget"); | |
| tokens.resize(n); | |
| llama_memory_clear(llama_get_memory(ctx), true); | |
| auto batch = llama_batch_get_one(tokens.data(), n); | |
| if (llama_decode(ctx, batch) != 0) throw std::runtime_error("prefill failed"); | |
| llama_synchronize(ctx); | |
| float *all = llama_get_logits_ith(ctx, -1); | |
| if (!all) throw std::runtime_error("missing logits"); | |
| std::vector<float> logits; | |
| for (int i = 0; i < k; ++i) { | |
| if (!std::isfinite(all[labels[i]])) throw std::runtime_error("nonfinite option logit"); | |
| logits.push_back(all[labels[i]]); | |
| } | |
| std::cout << json({{"logits", logits}, {"prompt_tokens", n}}).dump() << std::endl; | |
| } catch (const std::exception &e) { | |
| std::cout << json({{"error", e.what()}}).dump() << std::endl; | |
| } | |
| } | |
| llama_free(ctx); llama_model_free(model); llama_backend_free(); | |
| return 0; | |
| } | |