Instructions to use joehiggi/gcode-specialist-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use joehiggi/gcode-specialist-3b with PEFT:
Task type is invalid.
- llama-cpp-python
How to use joehiggi/gcode-specialist-3b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="joehiggi/gcode-specialist-3b", filename="gcode-specialist-q4_k_m.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use joehiggi/gcode-specialist-3b with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf joehiggi/gcode-specialist-3b:Q4_K_M # Run inference directly in the terminal: llama-cli -hf joehiggi/gcode-specialist-3b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf joehiggi/gcode-specialist-3b:Q4_K_M # Run inference directly in the terminal: llama-cli -hf joehiggi/gcode-specialist-3b: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 joehiggi/gcode-specialist-3b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf joehiggi/gcode-specialist-3b: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 joehiggi/gcode-specialist-3b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf joehiggi/gcode-specialist-3b:Q4_K_M
Use Docker
docker model run hf.co/joehiggi/gcode-specialist-3b:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use joehiggi/gcode-specialist-3b with Ollama:
ollama run hf.co/joehiggi/gcode-specialist-3b:Q4_K_M
- Unsloth Studio new
How to use joehiggi/gcode-specialist-3b 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 joehiggi/gcode-specialist-3b 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 joehiggi/gcode-specialist-3b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for joehiggi/gcode-specialist-3b to start chatting
- Docker Model Runner
How to use joehiggi/gcode-specialist-3b with Docker Model Runner:
docker model run hf.co/joehiggi/gcode-specialist-3b:Q4_K_M
- Lemonade
How to use joehiggi/gcode-specialist-3b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull joehiggi/gcode-specialist-3b:Q4_K_M
Run and chat with the model
lemonade run user.gcode-specialist-3b-Q4_K_M
List all available models
lemonade list
gcode-specialist-3b
LoRA fine-tune of bigcode/starcoder2-3b on 709 prompt to G-code pairs (CNC milling /
drilling operations across RS274/NGC, Fanuc, Haas, Siemens, Grbl dialects).
Exported to Q4_K_M GGUF for in-process inference via llama-cpp-python on
the g-gen HF Space.
Hyperparameters
- LoRA rank: 16, alpha: 32, dropout: 0.05
- target_modules: q_proj, k_proj, v_proj, o_proj, c_fc, c_proj
- max_seq_len: 2048, batch: 1 x 16 grad-accum
- epochs: 3, lr: 0.0002 (cosine, 10 warmup steps)
- 4-bit NF4 base via bitsandbytes, fp16 compute
Prompt format
<|system|>
You are a CNC G-code expert. Given a natural language description of a machining operation, output only valid G-code with no explanation, no markdown, and no prose. Each line must be a valid G-code block.
<|user|>
<your machining description>
<|assistant|>
<G-code>
Inference (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(model_path="gcode-specialist-q4_k_m.gguf", n_ctx=2048)
out = llm.create_completion(
"<|system|>\n" + SYSTEM_PROMPT + "\n<|user|>\nDrill 4 holes...\n<|assistant|>\n",
max_tokens=512, stop=["M30\n", "<|user|>"],
)
print(out["choices"][0]["text"])
- Downloads last month
- 82
Hardware compatibility
Log In to add your hardware
4-bit
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support
Model tree for joehiggi/gcode-specialist-3b
Base model
bigcode/starcoder2-3b