Instructions to use zero-systems/StructuredLLM-7b.GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zero-systems/StructuredLLM-7b.GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zero-systems/StructuredLLM-7b.GGUF")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("zero-systems/StructuredLLM-7b.GGUF") model = AutoModelForMultimodalLM.from_pretrained("zero-systems/StructuredLLM-7b.GGUF") - llama-cpp-python
How to use zero-systems/StructuredLLM-7b.GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="zero-systems/StructuredLLM-7b.GGUF", filename="structured_llm_7b_q4_0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use zero-systems/StructuredLLM-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 zero-systems/StructuredLLM-7b.GGUF:Q4_0 # Run inference directly in the terminal: llama-cli -hf zero-systems/StructuredLLM-7b.GGUF:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf zero-systems/StructuredLLM-7b.GGUF:Q4_0 # Run inference directly in the terminal: llama-cli -hf zero-systems/StructuredLLM-7b.GGUF:Q4_0
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 zero-systems/StructuredLLM-7b.GGUF:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf zero-systems/StructuredLLM-7b.GGUF:Q4_0
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 zero-systems/StructuredLLM-7b.GGUF:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf zero-systems/StructuredLLM-7b.GGUF:Q4_0
Use Docker
docker model run hf.co/zero-systems/StructuredLLM-7b.GGUF:Q4_0
- LM Studio
- Jan
- vLLM
How to use zero-systems/StructuredLLM-7b.GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zero-systems/StructuredLLM-7b.GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zero-systems/StructuredLLM-7b.GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/zero-systems/StructuredLLM-7b.GGUF:Q4_0
- SGLang
How to use zero-systems/StructuredLLM-7b.GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "zero-systems/StructuredLLM-7b.GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zero-systems/StructuredLLM-7b.GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "zero-systems/StructuredLLM-7b.GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zero-systems/StructuredLLM-7b.GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use zero-systems/StructuredLLM-7b.GGUF with Ollama:
ollama run hf.co/zero-systems/StructuredLLM-7b.GGUF:Q4_0
- Unsloth Studio
How to use zero-systems/StructuredLLM-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 zero-systems/StructuredLLM-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 zero-systems/StructuredLLM-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 zero-systems/StructuredLLM-7b.GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use zero-systems/StructuredLLM-7b.GGUF with Docker Model Runner:
docker model run hf.co/zero-systems/StructuredLLM-7b.GGUF:Q4_0
- Lemonade
How to use zero-systems/StructuredLLM-7b.GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull zero-systems/StructuredLLM-7b.GGUF:Q4_0
Run and chat with the model
lemonade run user.StructuredLLM-7b.GGUF-Q4_0
List all available models
lemonade list
StructuredLLM-7b.GGUF
StructuredLLM models aim to map a target data object consisting of a title and corresponding example values to a set of input titles and their example values. Mapping can be one-to-one or one-to-many.
Model Details
Model Description
- Model type: LLM
- Finetuned from model [optional]: mistralai/Mistral-7B-v0.1
Inference
.gguf models can be inferenced using llama.cpp (llama-cpp-python).
Please follow the instructions within these repos to get started.
Inference Examples
This is an instruct finetune utilizing the Alpaca instruct format (introduced by stanford-alpaca):
"{system_prompt}\n\n### Instruction:\n{instruction}\n\n### Response: "
The model is finetuned to perform the following task:
Structured Data Mapping
Expected input:
You are a business assistant that specialized in normalizing JSON data into a consistent structure.
You will be given tasks such as assessing which keys in an Input-JSON object map to a given Target-JSON.
The usecase of the information you respond with will be to carry over and transform data in the direction Input-JSON -> Target-JSON.
Keys can be considered valid mappings when either their names indicate the same or a very similar concept, or when their values are a close match in what they represent (salary, dates, IDs, etc.) or have similar formats. Mappings do not need to be an exact match, only have sufficient overlap.
For some cases, multiple keys from the Input-JSON might be required to map to the Target-JSON. This is the case if the value in the Target-JSON can only be arrived at due to the information present under multiple Input-JSON keys.
### Instruction:
Map the following Input-JSON to the given Target-JSON:
Input-JSON:
{
"FormEntryDate_INT": [
"1615785600",
"1615910400",
"1616131200"
],
"SPECIAL INDEX 2": [
"#00010",
"#00321",
"#00543"
],
"RET_BEN_VEST_Y5": [
"Fifty thousand, one dollar and eleven cents",
"Ninety-nine thousand, nine hundred ninety-nine dollars and ninety-nine cents",
"One thousand, two hundred thirty-four dollars and fifty-six cents"
],
"COM_GOV_GRD": [
"R",
"S",
"T"
],
"FSA_Trns_Elct_Sts": [
"ELE",
"STAT",
"WAIV"
],
"Variable Pay Structure ID": [
"VP-018/str",
"VP-019/str",
"VP-020/str"
],
"ParkingSlotID": [
"P10018",
"P10019",
"P10020"
],
"Ds3.DdQr": [
"2,718",
"4,057",
"3,951"
],
"CARRIER DEFINED REPORTING 6": [
"CR6Definition",
"R6ByCarrier",
"CarrierDefinition6"
],
"EE MaritalStatus": [
"Married but Reserved",
"Living Life as a Bachelor",
"Can't Be Tamed"
],
"PredictionMatrix_2030": [
"1.025",
"1.242",
"0.832"
],
"PensionFund[9]": [
"PRM-CHC-FND",
"ELITE-PEN-SCH",
"PLAT-PEN-PLAN"
],
"TOTAL_AMT": [
"$125.75",
"$790.80",
"$975.65"
],
"TrendRate": [
"1.0",
"1.0",
"1.0"
],
"YearlyValueChange": [
"0.01",
"0.04",
"0.01"
],
"EeEducationLevel": [
"BS Diploma",
"MA",
"MS Degree"
],
"retnedEarnsPrcntg": [
"0.90 of Total Earnings",
"0.95 of Total Earnings",
"1.00 of Total Earnings"
]
}
Target-JSON:
{
"PredictionMatrix_2040": [
"0.325",
"0.918",
"0.752"
]
}
### Response:
Expected Output:
{
"reasoning": "1. The target key 'PredictionMatrix_2040' likely refers to a prediction matrix for the year 2040. 2. The values of the target data are floating point numbers, indicating a certain rate or ratio. 3. The 'PredictionMatrix_2030' input key provides similar floating point values, which could be used to calculate or estimate the 'PredictionMatrix_2040' target key. The 'TrendRate' and 'YearlyValueChange' input keys could also potentially factor into calculating the target key's value.",
"mapped_input_keys": [
"PredictionMatrix_2030",
"TrendRate",
"YearlyValueChange"
]
}
Training Data
zero-systems/ColumnMapping.10k.INSTRUCT
Training Methodology
StructuredLLM was trained using QLoRA.
Resulting adapter was merged into the base model weights, converted to the gguf format and finally quantized to 4 bits.
- Downloads last month
- -
4-bit