Instructions to use huytd189/pintora-coder-7b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huytd189/pintora-coder-7b-gguf with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("huytd189/pintora-coder-7b-gguf", dtype="auto") - llama-cpp-python
How to use huytd189/pintora-coder-7b-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="huytd189/pintora-coder-7b-gguf", filename="pintora-coder-7b-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 huytd189/pintora-coder-7b-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf huytd189/pintora-coder-7b-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf huytd189/pintora-coder-7b-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf huytd189/pintora-coder-7b-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf huytd189/pintora-coder-7b-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 huytd189/pintora-coder-7b-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf huytd189/pintora-coder-7b-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 huytd189/pintora-coder-7b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf huytd189/pintora-coder-7b-gguf:Q4_K_M
Use Docker
docker model run hf.co/huytd189/pintora-coder-7b-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use huytd189/pintora-coder-7b-gguf with Ollama:
ollama run hf.co/huytd189/pintora-coder-7b-gguf:Q4_K_M
- Unsloth Studio new
How to use huytd189/pintora-coder-7b-gguf 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 huytd189/pintora-coder-7b-gguf 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 huytd189/pintora-coder-7b-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for huytd189/pintora-coder-7b-gguf to start chatting
- Docker Model Runner
How to use huytd189/pintora-coder-7b-gguf with Docker Model Runner:
docker model run hf.co/huytd189/pintora-coder-7b-gguf:Q4_K_M
- Lemonade
How to use huytd189/pintora-coder-7b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull huytd189/pintora-coder-7b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.pintora-coder-7b-gguf-Q4_K_M
List all available models
lemonade list
Pintora-Coder-7B-GGFUF
This repository contains the GGUF version (F16, Q8, Q4_K_M) version of the Pintora-Coder-7B model.
Original Model Card
Introduction
Pintora-Coder-7B is a fine-tuned version of Qwen2.5-Coder-7B to support the Pintora diagram language.
The model supports the following features:
- Generate diagrams from scratch.
- Edit existing diagrams.
Training Details
The model has been trained in the following steps:
- Continued pretraining with the pintora-instruct dataset.
- Instruction fine-tuned with the pintora-edit-instruct dataset.
Examples
Example 1: Generate diagram from scratch
Instruction:
Create a component diagram for a platform to buy and sell games between users.
Output code:
componentDiagram
package "Services" {
[Game Service]
[User Service]
}
database "Storage" {
[Games Table]
[Users Table]
}
[Game Service] --> [Games Table]
[User Service] --> [Users Table]
[Game Service] --> [User Service] : for authentication
Preview:
Example 2: Edit existing diagram
Instruction:
Add shopping cart and checkout service to this component diagram
componentDiagram
package "Services" {
[Game Service]
[User Service]
}
database "Storage" {
[Games Table]
[Users Table]
}
[Game Service] --> [Games Table]
[User Service] --> [Users Table]
[Game Service] --> [User Service] : for authentication
Output code:
componentDiagram
package "Services" {
[Game Service]
[User Service]
[Shopping Cart Service]
[Checkout Service]
}
database "Storage" {
[Games Table]
[Users Table]
[Cart Items Table]
[Orders Table]
}
[Game Service] --> [Games Table]
[User Service] --> [Users Table]
[Shopping Cart Service] --> [Cart Items Table]
[Checkout Service] --> [Cart Items Table]
[Checkout Service] --> [Orders Table]
[Game Service] --> [User Service] : for authentication
[Shopping Cart Service] --> [User Service] : for authentication
[Checkout Service] --> [User Service] : for authentication
Preview:
Running
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model
model_name = "huytd189/pintora-coder-7b"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
# Prompt template
edit_prompt = """Pintora Diagram Edit Instruction
### Instruction:
{}
{}
### Response:
{}"""
# Example 1: Generate from scratch
inputs = tokenizer([
edit_prompt.format(
"Create a component diagram for a platform to buy and sell games between users.",
"",
""
)
], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512, use_cache=True)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])
print("\n" + "="*80 + "\n")
# Example 2: Edit existing diagram
inputs = tokenizer([
edit_prompt.format(
"Add shopping cart and checkout service to this component diagram",
"""componentDiagram
package "Services" {
[Game Service]
[User Service]
}
database "Storage" {
[Games Table]
[Users Table]
}
[Game Service] --> [Games Table]
[User Service] --> [Users Table]
[Game Service] --> [User Service] : for authentication""",
""
)
], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512, use_cache=True)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])
- Downloads last month
- 8
4-bit
8-bit
16-bit

