Instructions to use theailearner/HiveCoder3.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use theailearner/HiveCoder3.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="theailearner/HiveCoder3.1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("theailearner/HiveCoder3.1") model = AutoModelForMultimodalLM.from_pretrained("theailearner/HiveCoder3.1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use theailearner/HiveCoder3.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "theailearner/HiveCoder3.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theailearner/HiveCoder3.1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/theailearner/HiveCoder3.1
- SGLang
How to use theailearner/HiveCoder3.1 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 "theailearner/HiveCoder3.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theailearner/HiveCoder3.1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "theailearner/HiveCoder3.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theailearner/HiveCoder3.1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use theailearner/HiveCoder3.1 with Docker Model Runner:
docker model run hf.co/theailearner/HiveCoder3.1
Download eval_report.json from theailearner/HiveCoder3.1: direct link, hf CLI and curl.
- Browser
- Download file 13.4 kB
-
https://huggingface.co/theailearner/HiveCoder3.1/resolve/main/eval_report.json
- Command line
-
hf download hf://theailearner/HiveCoder3.1/eval_report.json
-
curl -L -o eval_report.json https://huggingface.co/theailearner/HiveCoder3.1/resolve/main/eval_report.json
13.4 kB
| { | |
| "metrics": { | |
| "finished_cleanly": 1.0, | |
| "junk": 0.0, | |
| "invented_tools": 0.0, | |
| "format_leaks": 0.0, | |
| "empty": 0.0 | |
| }, | |
| "thresholds": { | |
| "finished_cleanly": [ | |
| ">=", | |
| 0.9 | |
| ], | |
| "junk": [ | |
| "<=", | |
| 0.0 | |
| ], | |
| "invented_tools": [ | |
| "<=", | |
| 0.02 | |
| ], | |
| "format_leaks": [ | |
| "<=", | |
| 0.05 | |
| ], | |
| "empty": [ | |
| "<=", | |
| 0.05 | |
| ] | |
| }, | |
| "passed": true, | |
| "replies": [ | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: {\"digits\": 3, \"batch1000_ms\": {\"baseline\": 39.7, \"double\": 92.3, \"consensus_vote\": 513.4}, \"single_ms_avg50", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "** but **~3\u20134\u00d7 faster to train** (and the talker-fraction knob can shrink the inference penalty if you run the talker at fewer steps, at some accuracy cost). Accuracy is equal or better in every case." | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: 7c7e3a3e-111f-4385-b1ca-3fa9c76cdbc3", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "Read agents.md, then make extensive tests and have the model use a 1M token context window, and use the deepseek V4 thin", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "read_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "Fair challenge. Check evidence.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "<task-notification>\n<task-id>b35o0kuhe</task-id>\n<tool-use-id>toolu_01VhvYYsJGbfjvEWBkGvvefM</tool-use-id>\n<output-file>", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "edited /home/user/letsclaudething/model_usage.py", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "web_search" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "<task-notification>\n<task-id>b5ezyrm78</task-id>\n<summary>Monitor event: \"double-decoder iteration sweep results\"</summa", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "\n\n5d_1200 seed 1: double 1.000 vs baseline 0.978 \u2014 ahead here too. Waiting on seed 2." | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: adapterType: agent.adapterType,\n executionTargetKind", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "Check background task bnesfbtio / bdr2903a8 output and ralph/tasks.md. If probe verified (task completed: True, checkbox", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n16 passed, 14 warnings in 4.65s\n314", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "\n\nSuite green \u2014 219 passed on CPU; the 2 failures were just the GPU\u2011hidden flex tests, which pass with GPU visible. Heavy e2e test skipped." | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "in the ralph section, make a interactive prompt that asks if you want to use claude, then are signed into claude, then a", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: runs/20260610_193911/:\nbenchmarks\ncheckpoints\nleaderboard_cache\nlogs\nmerges\n\nruns/20260610_193911/checkpoin", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "read_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT:", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "read_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: PID ELAPSED CMD\n1321201 10:21 python3 src/train.py\n1343627 01:29 .venv/bin/python -m py", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "\n\nStill running, but the test suite is still going \u2014 it's eating GPU memory and causing OOMs. Let me stop it." | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "Run complete. Recording results:", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: {\"runId\":\"f461228f-be89-4aad-8441-ed29aefcd6f0\",\"store\":\"local_file\",\"logRef\":\"b9ad5795-5f73-496f-9911-83eb", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: '<|im_start|>system\\nYou are Quill, an AI assistant with access to web search tools. Prefer bullet points f", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "edited /home/user/MythosMini/src/mythosmini/training/stm.py", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "edit_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fable", | |
| "prompt": "TOOL RESULT: 1\t/**\n * Builtin Paperclip control-plane tools for the Groq adapter.\n *\n * The Paperclip server does not (y", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "read_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Create a Python script that implements a basic diff tool comparing two text files. Save to diff_tool.py.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Create a docker-compose.yml for a Spring Boot stack with app, database, and Redis.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Write Python code to solve: compute the Euler totient function phi(n)", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Implement Bellman-Ford shortest path algorithm and write comprehensive test cases including edge cases.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "A user reported that this function returns wrong results for empty input. Find the bug:\n\n```python\ndef merge(a, b):\n ", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "f merge(a, b):\n if a is None: a = {}\n if b is None: b = {}\n result = {}\n for k, v in a.items():\n result[k] = v\n for k, v in b.items():\n result[k] = v\n return result\n```" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Implement a Python class called `LogAggregator` that detects failures and opens/closes circuit automatically. It should ", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Debug and fix the following Python code:\n\n```python\ndef average(numbers):\n total = sum(numbers)\n count = len(numbe", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "ptic `ZeroDivisionError`. The caller can catch it explicitly if needed:\n\n```python\ntry:\n result = average([])\nexcept ValueError as e:\n print(e) # \"Cannot calculate average of an empty list\"\n```" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Create a docker-compose.yml for a React frontend stack with app, MongoDB, and RabbitMQ.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "/effort\n effort", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "\n\nEffort is set to high." | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Improve the performance of this code by using bulk operations:\n\n```python\nclass DataProcessor:\n def __init__(self, co", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "his eliminates the per-item Python bytecode overhead of the loop body (branching, method calls, `append`). For large datasets the speedup is typically 2-5x depending on the filter/transform functions." | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Write a Python function to compute the edit distance (Levenshtein distance) between two strings. Save to edit_distance.p", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Convert this code to use f-strings instead of the current approach:\n\n```python\ndef handle_request(req):\n if req.metho", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "int(f\"Handling {req.method} request to {req.path}\")`)\n2. **Refactor routing** to use a dictionary-based approach\n3. **Something else** entirely\n\nLet me know what you're after and I'll make the change." | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Write a Go function called `lru_cache` that implements a thread pool for parallel task execution. Include comprehensive ", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Write a Python function that implements matrix multiplication. Save to matrix_mult.py with test cases.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Write a Python implementation of sliding window maximum with detailed comments explaining each step.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Restructure this code to follow DRY principle:\n\n```python\ndef handle_request(req):\n if req.method == 'GET':\n i", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "edit_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Write a Python script to analyze YAML data: compute statistics (mean, median, std dev), group by categories, and generat", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "This code is supposed to find the maximum but it doesn't work correctly. Debug and fix it:\n\n```python\ndef process(data):", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "\n```python\ndef process(data):\n result = []\n for i in range(len(data)):\n if data[i] > 0:\n result.append(data[i] * 2)\n return result\n```\n\nWhich behavior did you actually want?" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Create a Nginx configuration for reverse proxying a Python Flask application.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "mimo", | |
| "prompt": "Create a disjoint set (Union-Find) implementation that supports find and union.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "write_file" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fixed", | |
| "prompt": "hello. what can you do?", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "d analyze data.\n- **Planning**: Break down complex tasks into actionable steps.\n- **Sub-agents**: Delegate multi-step tasks to specialized sub-agents for parallel work.\n\nWhat would you like help with?" | |
| }, | |
| { | |
| "source": "fixed", | |
| "prompt": "Explain in plain prose how a TCP three-way handshake works.", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "aximum), and eventually gives up.\n- The whole exchange happens before any application data is sent. The connection can later be torn down with a similar multi-step process involving FIN and ACK flags." | |
| }, | |
| { | |
| "source": "fixed", | |
| "prompt": "List the python files in this folder.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fixed", | |
| "prompt": "Write a Python function that checks whether a string is a palindrome, with a short explanation.", | |
| "problems": [], | |
| "finish": "stop", | |
| "calls": [], | |
| "answer_tail": "tering step:\n\n```python\nimport re\n\ndef is_palindrome(s: str) -> bool:\n s = re.sub(r'[^a-z0-9]', '', s.lower())\n return s == s[::-1]\n```\n\nThis keeps only alphanumeric characters before comparing." | |
| }, | |
| { | |
| "source": "fixed", | |
| "prompt": "Find out which process is using port 8080 and stop it.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| }, | |
| { | |
| "source": "fixed", | |
| "prompt": "Continue from where you left off.", | |
| "problems": [], | |
| "finish": "tool_calls", | |
| "calls": [ | |
| "shell" | |
| ], | |
| "answer_tail": "" | |
| } | |
| ] | |
| } |