Text Generation
Transformers
Safetensors
GGUF
PyTorch
English
llama
llm
chatbot
causal-lm
harness
algosciencelab
vlsi
coding
reasoning
conversational
text-generation-inference
Instructions to use algoscienceacademy/Harness with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use algoscienceacademy/Harness with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="algoscienceacademy/Harness") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("algoscienceacademy/Harness") model = AutoModelForCausalLM.from_pretrained("algoscienceacademy/Harness", device_map="auto") 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]:])) - llama-cpp-python
How to use algoscienceacademy/Harness with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="algoscienceacademy/Harness", filename="harness_f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use algoscienceacademy/Harness 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 algoscienceacademy/Harness:F16 # Run inference directly in the terminal: llama cli -hf algoscienceacademy/Harness:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf algoscienceacademy/Harness:F16 # Run inference directly in the terminal: llama cli -hf algoscienceacademy/Harness: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 algoscienceacademy/Harness:F16 # Run inference directly in the terminal: ./llama-cli -hf algoscienceacademy/Harness: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 algoscienceacademy/Harness:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf algoscienceacademy/Harness:F16
Use Docker
docker model run hf.co/algoscienceacademy/Harness:F16
- LM Studio
- Jan
- vLLM
How to use algoscienceacademy/Harness with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "algoscienceacademy/Harness" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "algoscienceacademy/Harness", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/algoscienceacademy/Harness:F16
- SGLang
How to use algoscienceacademy/Harness 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 "algoscienceacademy/Harness" \ --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": "algoscienceacademy/Harness", "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 "algoscienceacademy/Harness" \ --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": "algoscienceacademy/Harness", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use algoscienceacademy/Harness with Ollama:
ollama run hf.co/algoscienceacademy/Harness:F16
- Unsloth Studio
How to use algoscienceacademy/Harness 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 algoscienceacademy/Harness 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 algoscienceacademy/Harness to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for algoscienceacademy/Harness to start chatting
- Atomic Chat new
- Docker Model Runner
How to use algoscienceacademy/Harness with Docker Model Runner:
docker model run hf.co/algoscienceacademy/Harness:F16
- Lemonade
How to use algoscienceacademy/Harness with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull algoscienceacademy/Harness:F16
Run and chat with the model
lemonade run user.Harness-F16
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,66 +1,277 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
datasets:
|
| 4 |
-
- cerebras/SlimPajama-627B
|
| 5 |
-
- bigcode/starcoderdata
|
| 6 |
-
- HuggingFaceH4/ultrachat_200k
|
| 7 |
-
- HuggingFaceH4/ultrafeedback_binarized
|
| 8 |
language:
|
| 9 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
widget:
|
| 11 |
-
- example_title:
|
| 12 |
messages:
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
---
|
|
|
|
| 18 |
<div align="center">
|
| 19 |
|
| 20 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
</div>
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
| 26 |
|
|
|
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
| 31 |
-
This is the chat model finetuned on top of [TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T). **We follow [HF's Zephyr](https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha)'s training recipe.** The model was " initially fine-tuned on a variant of the [`UltraChat`](https://huggingface.co/datasets/stingning/ultrachat) dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT.
|
| 32 |
-
We then further aligned the model with [🤗 TRL's](https://github.com/huggingface/trl) `DPOTrainer` on the [openbmb/UltraFeedback](https://huggingface.co/datasets/openbmb/UltraFeedback) dataset, which contain 64k prompts and model completions that are ranked by GPT-4."
|
| 33 |
|
|
|
|
| 34 |
|
| 35 |
-
#
|
| 36 |
-
You will need the transformers>=4.34
|
| 37 |
-
Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
from transformers import pipeline
|
| 46 |
|
| 47 |
-
pipe = pipeline(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|
| 50 |
messages = [
|
| 51 |
{
|
| 52 |
"role": "system",
|
| 53 |
-
"content": "You are
|
| 54 |
},
|
| 55 |
-
{
|
|
|
|
|
|
|
|
|
|
| 56 |
]
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
---
|
| 3 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
+
library_name: transformers
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
base_model: TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
|
| 9 |
+
tags:
|
| 10 |
+
- llm
|
| 11 |
+
- chatbot
|
| 12 |
+
- text-generation
|
| 13 |
+
- causal-lm
|
| 14 |
+
- harness
|
| 15 |
+
- algosciencelab
|
| 16 |
+
- vlsi
|
| 17 |
+
- coding
|
| 18 |
+
- reasoning
|
| 19 |
+
- pytorch
|
| 20 |
widget:
|
| 21 |
+
- example_title: Python Example
|
| 22 |
messages:
|
| 23 |
+
- role: system
|
| 24 |
+
content: You are Harness, an AI assistant created by Algo Science Lab.
|
| 25 |
+
- role: user
|
| 26 |
+
content: Write a Python function that calculates the factorial of a number.
|
| 27 |
---
|
| 28 |
+
|
| 29 |
<div align="center">
|
| 30 |
|
| 31 |
+
# Harness-1B
|
| 32 |
+
|
| 33 |
+
### Developed by Algo Science Lab
|
| 34 |
+
|
| 35 |
+
**Author:** Shahrear Hossain
|
| 36 |
+
|
| 37 |
+
**Hugging Face:** https://huggingface.co/algoscienceacademy
|
| 38 |
+
|
| 39 |
</div>
|
| 40 |
|
| 41 |
+
---
|
| 42 |
|
| 43 |
+
# Harness-1B
|
| 44 |
|
| 45 |
+
Harness-1B is a lightweight large language model developed by **Algo Science Lab** for instruction following, coding assistance, reasoning, mathematics, electronics, semiconductor engineering, VLSI design, and general conversational AI.
|
| 46 |
|
| 47 |
+
The model contains approximately **1 billion parameters**, making it suitable for local deployment while providing strong performance for everyday AI tasks.
|
| 48 |
|
| 49 |
+
Harness-1B has been fine-tuned to provide accurate, helpful, and concise responses across a wide variety of technical and general domains.
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
---
|
| 52 |
|
| 53 |
+
# Features
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
- General conversation
|
| 56 |
+
- Code generation
|
| 57 |
+
- Python programming
|
| 58 |
+
- C programming
|
| 59 |
+
- C++ programming
|
| 60 |
+
- Rust programming
|
| 61 |
+
- Java programming
|
| 62 |
+
- JavaScript
|
| 63 |
+
- TypeScript
|
| 64 |
+
- Verilog HDL
|
| 65 |
+
- SystemVerilog
|
| 66 |
+
- VHDL
|
| 67 |
+
- RTL Design
|
| 68 |
+
- FPGA Development
|
| 69 |
+
- ASIC Design
|
| 70 |
+
- CMOS Digital Design
|
| 71 |
+
- Semiconductor Engineering
|
| 72 |
+
- VLSI Design
|
| 73 |
+
- Mathematics
|
| 74 |
+
- Electronics
|
| 75 |
+
- Physics
|
| 76 |
+
- Problem Solving
|
| 77 |
+
- Technical Documentation
|
| 78 |
+
- AI Research Assistance
|
| 79 |
+
|
| 80 |
+
---
|
| 81 |
+
|
| 82 |
+
# Model Details
|
| 83 |
+
|
| 84 |
+
| Property | Value |
|
| 85 |
+
|----------|-------|
|
| 86 |
+
| Model Name | Harness-1B |
|
| 87 |
+
| Organization | Algo Science Lab |
|
| 88 |
+
| Hugging Face Username | algoscienceacademy |
|
| 89 |
+
| Parameters | ~1 Billion |
|
| 90 |
+
| Architecture | Llama-based |
|
| 91 |
+
| Model Type | Causal Language Model |
|
| 92 |
+
| Context Length | 2048 Tokens *(or your trained context size)* |
|
| 93 |
+
| Precision | FP16 / BF16 / GGUF |
|
| 94 |
+
| Framework | PyTorch |
|
| 95 |
+
| License | Apache-2.0 |
|
| 96 |
+
|
| 97 |
+
---
|
| 98 |
+
|
| 99 |
+
# Intended Uses
|
| 100 |
+
|
| 101 |
+
Harness-1B is designed for:
|
| 102 |
+
|
| 103 |
+
- AI Chatbots
|
| 104 |
+
- Programming Assistant
|
| 105 |
+
- Educational Applications
|
| 106 |
+
- Research
|
| 107 |
+
- Embedded AI
|
| 108 |
+
- Local AI Deployment
|
| 109 |
+
- Engineering Assistance
|
| 110 |
+
- Electronics Design
|
| 111 |
+
- FPGA Development
|
| 112 |
+
- ASIC/VLSI Workflow
|
| 113 |
+
- RTL Development
|
| 114 |
+
- Automation
|
| 115 |
+
- Documentation
|
| 116 |
+
|
| 117 |
+
---
|
| 118 |
+
|
| 119 |
+
# Example
|
| 120 |
|
| 121 |
+
```python
|
| 122 |
from transformers import pipeline
|
| 123 |
|
| 124 |
+
pipe = pipeline(
|
| 125 |
+
"text-generation",
|
| 126 |
+
model="algoscienceacademy/Harness-1B",
|
| 127 |
+
device_map="auto"
|
| 128 |
+
)
|
| 129 |
|
|
|
|
| 130 |
messages = [
|
| 131 |
{
|
| 132 |
"role": "system",
|
| 133 |
+
"content": "You are Harness, an AI assistant created by Algo Science Lab."
|
| 134 |
},
|
| 135 |
+
{
|
| 136 |
+
"role": "user",
|
| 137 |
+
"content": "Write a Python program to print Fibonacci numbers."
|
| 138 |
+
}
|
| 139 |
]
|
| 140 |
+
|
| 141 |
+
prompt = pipe.tokenizer.apply_chat_template(
|
| 142 |
+
messages,
|
| 143 |
+
tokenize=False,
|
| 144 |
+
add_generation_prompt=True
|
| 145 |
+
)
|
| 146 |
+
|
| 147 |
+
output = pipe(
|
| 148 |
+
prompt,
|
| 149 |
+
max_new_tokens=256,
|
| 150 |
+
temperature=0.7,
|
| 151 |
+
)
|
| 152 |
+
|
| 153 |
+
print(output[0]["generated_text"])
|
| 154 |
+
```
|
| 155 |
+
|
| 156 |
+
---
|
| 157 |
+
|
| 158 |
+
# GGUF Usage
|
| 159 |
+
|
| 160 |
+
Harness-1B is also available in GGUF format for:
|
| 161 |
+
|
| 162 |
+
- llama.cpp
|
| 163 |
+
- LM Studio
|
| 164 |
+
- Jan
|
| 165 |
+
- Open WebUI
|
| 166 |
+
- KoboldCpp
|
| 167 |
+
- Ollama (after conversion)
|
| 168 |
+
|
| 169 |
+
Example:
|
| 170 |
+
|
| 171 |
+
```bash
|
| 172 |
+
./main \
|
| 173 |
+
-m Harness-1B-Q4_K_M.gguf \
|
| 174 |
+
-p "Explain CMOS Inverter."
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
+
---
|
| 178 |
+
|
| 179 |
+
# Training
|
| 180 |
+
|
| 181 |
+
Harness-1B is trained and fine-tuned using open-source datasets and instruction-following techniques.
|
| 182 |
+
|
| 183 |
+
Possible data sources include:
|
| 184 |
+
|
| 185 |
+
- SlimPajama
|
| 186 |
+
- StarCoderData
|
| 187 |
+
- UltraChat
|
| 188 |
+
- UltraFeedback
|
| 189 |
+
|
| 190 |
+
Additional custom datasets may have been used during supervised fine-tuning.
|
| 191 |
+
|
| 192 |
+
---
|
| 193 |
+
|
| 194 |
+
# Capabilities
|
| 195 |
+
|
| 196 |
+
Harness-1B can:
|
| 197 |
+
|
| 198 |
+
- Answer questions
|
| 199 |
+
- Explain concepts
|
| 200 |
+
- Generate code
|
| 201 |
+
- Debug code
|
| 202 |
+
- Write documentation
|
| 203 |
+
- Solve mathematics
|
| 204 |
+
- Explain algorithms
|
| 205 |
+
- Assist with VLSI
|
| 206 |
+
- Help with FPGA design
|
| 207 |
+
- Generate Verilog
|
| 208 |
+
- Generate SystemVerilog
|
| 209 |
+
- Produce technical reports
|
| 210 |
+
|
| 211 |
+
---
|
| 212 |
+
|
| 213 |
+
# Limitations
|
| 214 |
+
|
| 215 |
+
Harness-1B may:
|
| 216 |
+
|
| 217 |
+
- Produce incorrect information.
|
| 218 |
+
- Generate outdated knowledge.
|
| 219 |
+
- Make reasoning mistakes.
|
| 220 |
+
- Require verification for safety-critical applications.
|
| 221 |
+
- Require human review for production environments.
|
| 222 |
+
|
| 223 |
+
---
|
| 224 |
+
|
| 225 |
+
# Hardware Requirements
|
| 226 |
+
|
| 227 |
+
Recommended:
|
| 228 |
+
|
| 229 |
+
- 8 GB RAM (Q4 GGUF)
|
| 230 |
+
- 12 GB RAM (Q6 GGUF)
|
| 231 |
+
- 16 GB RAM (FP16)
|
| 232 |
+
- CUDA GPU recommended but optional
|
| 233 |
+
|
| 234 |
+
---
|
| 235 |
+
|
| 236 |
+
# Citation
|
| 237 |
+
|
| 238 |
+
```bibtex
|
| 239 |
+
@misc{Harness1B,
|
| 240 |
+
title={Harness-1B},
|
| 241 |
+
author={Algo Science Lab},
|
| 242 |
+
year={2026},
|
| 243 |
+
publisher={Hugging Face},
|
| 244 |
+
howpublished={https://huggingface.co/algoscienceacademy/Harness-1B}
|
| 245 |
+
}
|
| 246 |
+
```
|
| 247 |
+
|
| 248 |
+
---
|
| 249 |
+
|
| 250 |
+
# License
|
| 251 |
+
|
| 252 |
+
Apache License 2.0
|
| 253 |
+
|
| 254 |
+
---
|
| 255 |
+
|
| 256 |
+
# Acknowledgements
|
| 257 |
+
|
| 258 |
+
Harness-1B builds upon open-source language model research and would not be possible without the work of the open-source AI community, including:
|
| 259 |
+
|
| 260 |
+
- Meta AI (Llama Architecture)
|
| 261 |
+
- TinyLlama Project
|
| 262 |
+
- Hugging Face
|
| 263 |
+
- PyTorch
|
| 264 |
+
- Transformers
|
| 265 |
+
- llama.cpp
|
| 266 |
+
|
| 267 |
+
---
|
| 268 |
+
|
| 269 |
+
# Contact
|
| 270 |
+
|
| 271 |
+
**Organization:** Algo Science Lab
|
| 272 |
+
|
| 273 |
+
**Hugging Face:** https://huggingface.co/algoscienceacademy
|
| 274 |
+
|
| 275 |
+
---
|
| 276 |
+
|
| 277 |
+
Made with ❤️ by Algo Science Lab.
|