Instructions to use DarkKnighToS223/Flare-9B-low-level-programming with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use DarkKnighToS223/Flare-9B-low-level-programming with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="DarkKnighToS223/Flare-9B-low-level-programming", filename="OmniCoder-9B.BF16-mmproj.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use DarkKnighToS223/Flare-9B-low-level-programming 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 DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M # Run inference directly in the terminal: llama cli -hf DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M # Run inference directly in the terminal: llama cli -hf DarkKnighToS223/Flare-9B-low-level-programming: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 DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf DarkKnighToS223/Flare-9B-low-level-programming: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 DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
Use Docker
docker model run hf.co/DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use DarkKnighToS223/Flare-9B-low-level-programming with Ollama:
ollama run hf.co/DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
- Unsloth Studio
How to use DarkKnighToS223/Flare-9B-low-level-programming with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for DarkKnighToS223/Flare-9B-low-level-programming to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for DarkKnighToS223/Flare-9B-low-level-programming to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for DarkKnighToS223/Flare-9B-low-level-programming to start chatting
- Pi
How to use DarkKnighToS223/Flare-9B-low-level-programming with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use DarkKnighToS223/Flare-9B-low-level-programming with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
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:8080/v1 hermes config set model.default DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use DarkKnighToS223/Flare-9B-low-level-programming with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
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:8080/v1 \ --custom-model-id "DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M" \ --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"
- Docker Model Runner
How to use DarkKnighToS223/Flare-9B-low-level-programming with Docker Model Runner:
docker model run hf.co/DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
- Lemonade
How to use DarkKnighToS223/Flare-9B-low-level-programming with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull DarkKnighToS223/Flare-9B-low-level-programming:Q4_K_M
Run and chat with the model
lemonade run user.Flare-9B-low-level-programming-Q4_K_M
List all available models
lemonade list
Flare-9B — Low-Level Programming
Flare-9B is a continued-pretrained version of Tesslate/OmniCoder-9B, adapted toward low-level and legacy programming languages:
- x86-64 assembly
- COBOL
- C
The goal of this experiment was to improve performance on niche, low-resource programming languages while retaining the base model's general coding capability.
Flare-9B is primarily a code-completion model rather than a chat model. It works best when given a function signature, partial implementation, or program skeleton.
Training
| Property | Value |
|---|---|
| Base model | Tesslate/OmniCoder-9B |
| Parameters | 9.6B |
| Method | QLoRA |
| Quantization | 4-bit NF4 |
| LoRA rank | 64 |
| LoRA alpha | 128 |
| Trainable parameters | 173M (1.81%) |
| Training data | DarkKnighToS223/Assm-cobol-c-c |
| Training file | train-cpt.jsonl |
| Tokens processed | ~35M |
| Training progress | 0.5 epoch |
| Sequence length | 2048 |
| Hardware | 1× NVIDIA RTX 5090 |
| Training time | ~3.3 hours |
| Framework | Unsloth + PEFT |
Evaluation
Methodology
The low-level evaluation uses code execution rather than text similarity.
Generated completions are:
- inserted into the corresponding test harness;
- compiled using GCC or GnuCOBOL;
- executed against assertions;
- counted as correct only when compilation and all runtime checks succeed.
Evaluation settings:
| Setting | Value |
|---|---|
| Metric | pass@1 |
| Decoding | Greedy |
| Sampling | Disabled |
| Prompting mode | Code completion |
| Low-level tasks | 10 per language |
| Validation | Compilation and execution |
The low-level suites are intentionally small and should be treated as diagnostic evaluations, not comprehensive measurements of language proficiency.
Low-level programming
| Suite | Passed | pass@1 |
|---|---|---|
| C low-level | 10/10 | 100.0% |
| COBOL | 6/10 | 60.0% |
| x86-64 Assembly | 2/10 | 20.0% |
| Overall | 18/30 | 60.0% |
General coding
| Benchmark | Score |
|---|---|
| HumanEval (Python) | 77.5% pass@1 |
Flare-9B achieved strong results on the diagnostic C suite and passed six of ten executed COBOL tasks. Assembly remained the weakest evaluated area, particularly for tasks involving conditionals, loops, and memory traversal.
An interesting outcome is that COBOL produced the stronger diagnostic result even though assembly comprised most of the continued-pretraining corpus and the training dataset contained only 143 COBOL examples.
A directly comparable evaluation of the unmodified base checkpoint is required before drawing strong conclusions about improvement or regression caused by CPT.
Usage
Flare-9B was continued-pretrained primarily on raw code. For best results, use completion-style prompts containing concrete code context instead of long conversational instructions.
Good prompt formats include:
- function signatures;
- partial implementations;
- program skeletons;
- comments immediately followed by code;
- explicit architecture, ABI, or compiler constraints.
Transformers
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "DarkKnighToS223/Flare-9B-low-level-programming"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True,
)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto",
trust_remote_code=True,
)
prompt = """/* x86-64 System V ABI: return a + b */
.intel_syntax noprefix
.global add_asm
add_asm:
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs,
max_new_tokens=128,
do_sample=False,
)
generated_tokens = outputs[0, inputs["input_ids"].shape[1]:]
completion = tokenizer.decode(generated_tokens, skip_special_tokens=True)
print(completion)
Verify that your installed Transformers version supports the model architecture. If the checkpoint configuration maps to a causal language model instead, replace
AutoModelForImageTextToTextwithAutoModelForCausalLM.
Prompt example: C
#include <stdint.h>
/* Rotate a 32-bit unsigned integer left by r bits. */
uint32_t rotate_left(uint32_t value, unsigned int r) {
Prompt example: COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID. SUM-TO-TEN.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 TOTAL-VALUE PIC 9(4) VALUE 0.
01 LOOP-INDEX PIC 9(2) VALUE 0.
PROCEDURE DIVISION.
Prompt example: x86-64 Assembly
.intel_syntax noprefix
.text
# System V AMD64 ABI
# int max_asm(int a, int b)
.global max_asm
max_asm:
For assembly prompts, explicitly specify:
- Intel or AT&T syntax;
- target architecture;
- calling convention;
- expected symbol name;
- input and return types.
GGUF
GGUF quantizations are available for use with llama.cpp:
Q8_0Q6_KQ5_K_MQ4_K_MQ2_K
Q4_K_M or higher is recommended for more reliable code generation. Q2_K
substantially reduces model size but may noticeably degrade output quality,
especially for syntax-sensitive languages.
Limitations
- The low-level evaluation contains only 10 tasks per language.
- The reported results are preliminary and may have high variance.
- Assembly performance is currently limited.
- The model may generate code that does not compile or that violates the requested ABI.
- Generated code may contain security vulnerabilities or undefined behavior.
- HumanEval and the low-level suites measure only a limited subset of coding ability.
- Completion-oriented prompting generally works better than chat-style prompting.
- Quantization can reduce accuracy, especially at very low bit widths.
- No claim is made that the model is suitable for production-critical systems.
Always inspect, compile, test, and review generated code before use.
Reproducibility
For fully reproducible low-level results, the following should be published alongside the model:
- benchmark prompts;
- test harnesses and assertions;
- generation configuration;
- output-extraction logic;
- compiler versions and flags;
- raw model completions;
- base-model results produced with the same evaluation pipeline.
Intended use
Flare-9B is intended for:
- research on low-resource programming languages;
- code-completion experiments;
- legacy-code exploration;
- low-level programming assistance;
- continued-pretraining and parameter-efficient fine-tuning research.
It is not intended to replace compiler diagnostics, testing, static analysis, security review, or expert verification.
License
This model is released under the Apache License 2.0, following the license of the base model.
Users are responsible for reviewing the licenses and usage conditions of the base model, training dataset, dependencies, and generated outputs.
- Downloads last month
- 94
2-bit
4-bit
6-bit
8-bit