Instructions to use josephmayo/Holo-3.1-4B-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use josephmayo/Holo-3.1-4B-Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="josephmayo/Holo-3.1-4B-Coder") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("josephmayo/Holo-3.1-4B-Coder") model = AutoModelForMultimodalLM.from_pretrained("josephmayo/Holo-3.1-4B-Coder") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use josephmayo/Holo-3.1-4B-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "josephmayo/Holo-3.1-4B-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "josephmayo/Holo-3.1-4B-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/josephmayo/Holo-3.1-4B-Coder
- SGLang
How to use josephmayo/Holo-3.1-4B-Coder 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 "josephmayo/Holo-3.1-4B-Coder" \ --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": "josephmayo/Holo-3.1-4B-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "josephmayo/Holo-3.1-4B-Coder" \ --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": "josephmayo/Holo-3.1-4B-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use josephmayo/Holo-3.1-4B-Coder with Docker Model Runner:
docker model run hf.co/josephmayo/Holo-3.1-4B-Coder
Update model card
Browse files
README.md
CHANGED
|
@@ -1,6 +1,58 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Hcompany/Holo-3.1-4B
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- coding
|
| 7 |
+
- merged
|
| 8 |
+
- safetensors
|
| 9 |
+
- python
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Holo-3.1-4B Coding Merged Model
|
| 13 |
+
|
| 14 |
+
## Overview
|
| 15 |
+
|
| 16 |
+
This repository contains a merged Transformers checkpoint produced from `Hcompany/Holo-3.1-4B` and the companion coding LoRA adapter. It is intended for users who prefer loading a standard merged model rather than applying a PEFT adapter at runtime.
|
| 17 |
+
|
| 18 |
+
## What Is Included
|
| 19 |
+
|
| 20 |
+
- Merged model weights in sharded `safetensors` format.
|
| 21 |
+
- Model configuration and generation configuration.
|
| 22 |
+
- Tokenizer and chat template files.
|
| 23 |
+
- A model card summarizing the measured coding adaptation result.
|
| 24 |
+
|
| 25 |
+
## Training And Evaluation Summary
|
| 26 |
+
|
| 27 |
+
The underlying adapter was trained with supervised fine-tuning on curated coding instruction data. Evaluation used an 80-task held-out greedy decoding probe drawn from HumanEval-style and MBPP-style tasks.
|
| 28 |
+
|
| 29 |
+
Measured result on the held-out probe:
|
| 30 |
+
|
| 31 |
+
- Base model: 24 / 80 tasks passed.
|
| 32 |
+
- Adapted model: 31 / 80 tasks passed.
|
| 33 |
+
- Relative lift over the measured base result: 29.17%.
|
| 34 |
+
|
| 35 |
+
The merged model should match the adapter-applied behavior, subject to normal numerical and runtime differences.
|
| 36 |
+
|
| 37 |
+
## Intended Use
|
| 38 |
+
|
| 39 |
+
Use this checkpoint for coding assistance experiments, Python function generation, lightweight algorithmic problem solving, and local inference workflows that expect standard Transformers model files.
|
| 40 |
+
|
| 41 |
+
## Known Limitations
|
| 42 |
+
|
| 43 |
+
- The evaluation probe is small and does not cover all programming languages or repository-scale workflows.
|
| 44 |
+
- The model can produce incorrect code, incomplete reasoning, or solutions that fail edge cases.
|
| 45 |
+
- Generated code should be reviewed, tested, and sandboxed where appropriate.
|
| 46 |
+
- The checkpoint inherits limitations and licensing terms from the base model and adaptation data sources.
|
| 47 |
+
|
| 48 |
+
## File List
|
| 49 |
+
|
| 50 |
+
- `model-00001-of-00009.safetensors` through `model-00009-of-00009.safetensors`: merged model shards.
|
| 51 |
+
- `model.safetensors.index.json`: shard index.
|
| 52 |
+
- `config.json`, `generation_config.json`: model configuration files.
|
| 53 |
+
- `tokenizer.json`, `tokenizer_config.json`, `chat_template.jinja`: tokenizer/chat assets.
|
| 54 |
+
- `README.md`: this model card.
|
| 55 |
+
|
| 56 |
+
## Reproducibility And Provenance
|
| 57 |
+
|
| 58 |
+
The model was produced by merging a PEFT LoRA coding adapter into `Hcompany/Holo-3.1-4B` and saving the result as sharded `safetensors`. Companion evaluation and training provenance artifacts are available in the LoRA repository.
|