Instructions to use Fox-AI-by-teolm30/fox1.3 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 Fox-AI-by-teolm30/fox1.3 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 Fox-AI-by-teolm30/fox1.3 # Run inference directly in the terminal: llama cli -hf Fox-AI-by-teolm30/fox1.3
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Fox-AI-by-teolm30/fox1.3 # Run inference directly in the terminal: llama cli -hf Fox-AI-by-teolm30/fox1.3
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 Fox-AI-by-teolm30/fox1.3 # Run inference directly in the terminal: ./llama-cli -hf Fox-AI-by-teolm30/fox1.3
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 Fox-AI-by-teolm30/fox1.3 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Fox-AI-by-teolm30/fox1.3
Use Docker
docker model run hf.co/Fox-AI-by-teolm30/fox1.3
- LM Studio
- Jan
- Ollama
How to use Fox-AI-by-teolm30/fox1.3 with Ollama:
ollama run hf.co/Fox-AI-by-teolm30/fox1.3
- Unsloth Studio
How to use Fox-AI-by-teolm30/fox1.3 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 Fox-AI-by-teolm30/fox1.3 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 Fox-AI-by-teolm30/fox1.3 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Fox-AI-by-teolm30/fox1.3 to start chatting
- Pi
How to use Fox-AI-by-teolm30/fox1.3 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Fox-AI-by-teolm30/fox1.3
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": "Fox-AI-by-teolm30/fox1.3" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use Fox-AI-by-teolm30/fox1.3 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Fox-AI-by-teolm30/fox1.3
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 "Fox-AI-by-teolm30/fox1.3" \ --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 Fox-AI-by-teolm30/fox1.3 with Docker Model Runner:
docker model run hf.co/Fox-AI-by-teolm30/fox1.3
- Lemonade
How to use Fox-AI-by-teolm30/fox1.3 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Fox-AI-by-teolm30/fox1.3
Run and chat with the model
lemonade run user.fox1.3-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Fox-AI-by-teolm30/fox1.3 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Fox-AI-by-teolm30/fox1.3
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 Fox-AI-by-teolm30/fox1.3
Run Hermes
hermes
- Atomic Chat
| #!/usr/bin/env python3 | |
| """ | |
| Fox1.3 Training Script | |
| LoRA fine-tuning on Qwen2.5-1B-Instruct with CodeAlpaca dataset | |
| """ | |
| import os | |
| import torch | |
| from datasets import load_dataset | |
| from transformers import ( | |
| AutoModelForCausalLM, | |
| AutoTokenizer, | |
| BitsAndBytesConfig, | |
| TrainingArguments, | |
| Trainer, | |
| DataCollatorForLanguageModeling | |
| ) | |
| from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training | |
| import logging | |
| logging.basicConfig(level=logging.INFO) | |
| logger = logging.getLogger(__name__) | |
| # Config | |
| MODEL_NAME = "Qwen/Qwen2.5-1B-Instruct" | |
| DATASET_NAME = "HuggingFaceH4/CodeAlpaca_20K" | |
| OUTPUT_DIR = "./fox1.3-checkpoints" | |
| REPO_NAME = "teolm30/fox1.3" | |
| NUM_EPOCHS = 3 | |
| BATCH_SIZE = 2 | |
| LEARNING_RATE = 2e-4 | |
| MAX_seq_LENGTH = 2048 | |
| def load_tokenizer(): | |
| logger.info(f"Loading tokenizer: {MODEL_NAME}") | |
| tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, trust_remote_code=True) | |
| tokenizer.pad_token = tokenizer.eos_token | |
| return tokenizer | |
| def load_model(tokenizer): | |
| logger.info(f"Loading model: {MODEL_NAME}") | |
| # Quantization config for memory efficiency | |
| bnb_config = BitsAndBytesConfig( | |
| load_in_4bit=True, | |
| bnb_4bit_quant_type="nf4", | |
| bnb_4bit_compute_dtype=torch.float16, | |
| bnb_4bit_use_double_quant=True, | |
| ) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| MODEL_NAME, | |
| quantization_config=bnb_config, | |
| device_map="auto", | |
| trust_remote_code=True | |
| ) | |
| model = prepare_model_for_kbit_training(model) | |
| # LoRA config | |
| lora_config = LoraConfig( | |
| r=8, | |
| lora_alpha=16, | |
| target_modules=["q_proj", "k_proj", "v_proj", "o_proj"], | |
| lora_dropout=0.05, | |
| bias="none", | |
| task_type="CAUSAL_LM" | |
| ) | |
| model = get_peft_model(model, lora_config) | |
| model.print_trainable_parameters() | |
| return model | |
| def format_instruction(example): | |
| """Format dataset example for instruction tuning.""" | |
| instruction = example.get("instruction", "") | |
| input_text = example.get("input", "") | |
| output = example.get("output", "") | |
| if input_text: | |
| text = f"### Instruction:\n{instruction}\n\n### Input:\n{input_text}\n\n### Response:\n{output}" | |
| else: | |
| text = f"### Instruction:\n{instruction}\n\n### Response:\n{output}" | |
| return {"text": text} | |
| def tokenize(example, tokenizer, max_length): | |
| result = tokenizer( | |
| example["text"], | |
| truncation=True, | |
| max_length=max_length, | |
| padding="max_length" | |
| ) | |
| result["labels"] = result["input_ids"].copy() | |
| return result | |
| def main(): | |
| logger.info("Starting Fox1.3 training pipeline...") | |
| # Load tokenizer and model | |
| tokenizer = load_tokenizer() | |
| model = load_model(tokenizer) | |
| # Load and format dataset | |
| logger.info(f"Loading dataset: {DATASET_NAME}") | |
| dataset = load_dataset(DATASET_NAME, split="train") | |
| # Format instructions | |
| dataset = dataset.map(format_instruction, remove_columns=dataset.column_names) | |
| # Tokenize | |
| dataset = dataset.map( | |
| lambda x: tokenize(x, tokenizer, MAX_SEQ_LENGTH), | |
| batched=True, | |
| remove_columns=["text"] | |
| ) | |
| # Split for eval | |
| dataset = dataset.train_test_split(test_size=0.1) | |
| train_dataset = dataset["train"] | |
| eval_dataset = dataset["test"] | |
| logger.info(f"Train size: {len(train_dataset)}, Eval size: {len(eval_dataset)}") | |
| # Training args | |
| training_args = TrainingArguments( | |
| output_dir=OUTPUT_DIR, | |
| num_train_epochs=NUM_EPOCHS, | |
| per_device_train_batch_size=BATCH_SIZE, | |
| per_device_eval_batch_size=BATCH_SIZE, | |
| learning_rate=LEARNING_RATE, | |
| warmup_steps=100, | |
| logging_steps=50, | |
| eval_strategy="epoch", | |
| save_strategy="epoch", | |
| save_total_limit=2, | |
| bf16=True, | |
| tf32=True, | |
| optim="paged_adamw_8bit", | |
| group_by_length=True, | |
| report_to="none", | |
| push_to_hub=True, | |
| hub_model_id=REPO_NAME, | |
| ) | |
| # Data collator | |
| data_collator = DataCollatorForLanguageModeling( | |
| tokenizer=tokenizer, | |
| mlm=False | |
| ) | |
| # Trainer | |
| trainer = Trainer( | |
| model=model, | |
| args=training_args, | |
| train_dataset=train_dataset, | |
| eval_dataset=eval_dataset, | |
| data_collator=data_collator, | |
| ) | |
| logger.info("Starting training...") | |
| trainer.train() | |
| logger.info("Training complete! Saving and pushing to hub...") | |
| trainer.push_to_hub() | |
| logger.info(f"Done! Model pushed to https://huggingface.co/{REPO_NAME}") | |
| if __name__ == "__main__": | |
| main() | |