Instructions to use philippotiger/forecast-extractor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use philippotiger/forecast-extractor 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 philippotiger/forecast-extractor:F16 # Run inference directly in the terminal: llama cli -hf philippotiger/forecast-extractor:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf philippotiger/forecast-extractor:F16 # Run inference directly in the terminal: llama cli -hf philippotiger/forecast-extractor:F16
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 philippotiger/forecast-extractor:F16 # Run inference directly in the terminal: ./llama-cli -hf philippotiger/forecast-extractor:F16
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 philippotiger/forecast-extractor:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf philippotiger/forecast-extractor:F16
Use Docker
docker model run hf.co/philippotiger/forecast-extractor:F16
- LM Studio
- Jan
- vLLM
How to use philippotiger/forecast-extractor with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "philippotiger/forecast-extractor" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "philippotiger/forecast-extractor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/philippotiger/forecast-extractor:F16
- Ollama
How to use philippotiger/forecast-extractor with Ollama:
ollama run hf.co/philippotiger/forecast-extractor:F16
- Unsloth Studio
How to use philippotiger/forecast-extractor 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 philippotiger/forecast-extractor 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 philippotiger/forecast-extractor to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for philippotiger/forecast-extractor to start chatting
- Pi
How to use philippotiger/forecast-extractor with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf philippotiger/forecast-extractor:F16
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": "philippotiger/forecast-extractor:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use philippotiger/forecast-extractor with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf philippotiger/forecast-extractor:F16
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 "philippotiger/forecast-extractor:F16" \ --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 philippotiger/forecast-extractor with Docker Model Runner:
docker model run hf.co/philippotiger/forecast-extractor:F16
- Lemonade
How to use philippotiger/forecast-extractor with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull philippotiger/forecast-extractor:F16
Run and chat with the model
lemonade run user.forecast-extractor-F16
List all available models
lemonade list
- Hermes Agent
How to use philippotiger/forecast-extractor with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf philippotiger/forecast-extractor:F16
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 philippotiger/forecast-extractor:F16
Run Hermes
hermes
- Atomic Chat
| """ | |
| Fine-tuning Qwen2.5-3B-Instruct for football prediction extraction | |
| Fixes from original: target_modules, validation split, scheduler, checkpoint saving | |
| """ | |
| from datasets import load_dataset | |
| from transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments, BitsAndBytesConfig | |
| from peft import LoraConfig | |
| from trl import SFTTrainer, DataCollatorForCompletionOnlyLM | |
| import torch | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| # CONFIG | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| MODEL_NAME = "Qwen/Qwen2.5-3B-Instruct" | |
| OUTPUT_DIR = "./football-extractor" | |
| TRAIN_FILE = "train_dataset.jsonl" | |
| VAL_FILE = "val_dataset.jsonl" | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| # LOAD DATA | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| dataset = load_dataset("json", data_files={"train": TRAIN_FILE, "validation": VAL_FILE}) | |
| print(f"Train: {len(dataset['train'])} | Val: {len(dataset['validation'])}") | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| # TOKENIZER | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME) | |
| tokenizer.pad_token = tokenizer.eos_token | |
| tokenizer.padding_side = "right" # important for causal LM training | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| # QUANTIZATION (4-bit QLoRA) | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| bnb_config = BitsAndBytesConfig( | |
| load_in_4bit=True, | |
| bnb_4bit_quant_type="nf4", | |
| bnb_4bit_compute_dtype=torch.bfloat16, # bfloat16 is more stable than float16 | |
| bnb_4bit_use_double_quant=True, # saves a bit more VRAM | |
| ) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| MODEL_NAME, | |
| quantization_config=bnb_config, | |
| device_map="auto", | |
| attn_implementation="eager", # avoids flash-attn issues on Colab | |
| ) | |
| model.config.use_cache = False # required for gradient checkpointing | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| # LORA CONFIG | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| lora_config = LoraConfig( | |
| r=8, # smaller r is fine for simple extraction | |
| lora_alpha=16, | |
| lora_dropout=0.05, | |
| bias="none", | |
| task_type="CAUSAL_LM", | |
| # Explicitly target attention + MLP layers for Qwen2.5 | |
| target_modules=[ | |
| "q_proj", "k_proj", "v_proj", "o_proj", | |
| "gate_proj", "up_proj", "down_proj" | |
| ], | |
| ) | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| # FORMAT FUNCTION | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| def format_example(example): | |
| """Apply Qwen2.5 chat template to each training example.""" | |
| return tokenizer.apply_chat_template( | |
| example["messages"], | |
| tokenize=False, | |
| add_generation_prompt=False | |
| ) | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| # TRAINING ARGS | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| training_args = TrainingArguments( | |
| output_dir=OUTPUT_DIR, | |
| per_device_train_batch_size=1, | |
| gradient_accumulation_steps=4, # effective batch = 4 | |
| gradient_checkpointing=True, # saves VRAM | |
| learning_rate=2e-4, | |
| num_train_epochs=3, | |
| lr_scheduler_type="cosine", # smooth decay | |
| warmup_ratio=0.05, # 5% warmup steps | |
| logging_steps=10, | |
| eval_strategy="epoch", # evaluate after each epoch | |
| save_strategy="epoch", # save checkpoint each epoch | |
| save_total_limit=2, # keep only last 2 checkpoints | |
| load_best_model_at_end=True, | |
| metric_for_best_model="eval_loss", | |
| fp16=False, | |
| bf16=True, # use bfloat16 if your GPU supports it | |
| report_to="none", # set to "wandb" if you want tracking | |
| ) | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| # TRAINER | |
| # βββββββββββββββββββββββββββββββββββββββββββββ | |
| trainer = SFTTrainer( | |
| model=model, | |
| train_dataset=dataset["train"], | |
| eval_dataset=dataset["validation"], | |
| peft_config=lora_config, | |
| args=training_args, | |
| formatting_func=format_example, | |
| max_seq_length=512, # extraction tasks are short | |
| ) | |
| trainer.train() | |
| trainer.save_model(OUTPUT_DIR) | |
| tokenizer.save_pretrained(OUTPUT_DIR) | |
| print(f"β Adapter saved to {OUTPUT_DIR}") | |