初始化项目,由ModelHub XC社区提供模型
Model: algoscienceacademy/Harness Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
harness_f16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
277
README.md
Normal file
277
README.md
Normal file
@@ -0,0 +1,277 @@
|
||||
|
||||
---
|
||||
license: apache-2.0
|
||||
language:
|
||||
- en
|
||||
library_name: transformers
|
||||
pipeline_tag: text-generation
|
||||
base_model: TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
|
||||
tags:
|
||||
- llm
|
||||
- chatbot
|
||||
- text-generation
|
||||
- causal-lm
|
||||
- harness
|
||||
- algosciencelab
|
||||
- vlsi
|
||||
- coding
|
||||
- reasoning
|
||||
- pytorch
|
||||
widget:
|
||||
- example_title: Python Example
|
||||
messages:
|
||||
- role: system
|
||||
content: You are Harness, an AI assistant created by Algo Science Lab.
|
||||
- role: user
|
||||
content: Write a Python function that calculates the factorial of a number.
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
# Harness-1B
|
||||
|
||||
### Developed by Algo Science Lab
|
||||
|
||||
**Author:** Shahrear Hossain
|
||||
|
||||
**Hugging Face:** https://huggingface.co/algoscienceacademy
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
# Harness-1B
|
||||
|
||||
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.
|
||||
|
||||
The model contains approximately **1 billion parameters**, making it suitable for local deployment while providing strong performance for everyday AI tasks.
|
||||
|
||||
Harness-1B has been fine-tuned to provide accurate, helpful, and concise responses across a wide variety of technical and general domains.
|
||||
|
||||
---
|
||||
|
||||
# Features
|
||||
|
||||
- General conversation
|
||||
- Code generation
|
||||
- Python programming
|
||||
- C programming
|
||||
- C++ programming
|
||||
- Rust programming
|
||||
- Java programming
|
||||
- JavaScript
|
||||
- TypeScript
|
||||
- Verilog HDL
|
||||
- SystemVerilog
|
||||
- VHDL
|
||||
- RTL Design
|
||||
- FPGA Development
|
||||
- ASIC Design
|
||||
- CMOS Digital Design
|
||||
- Semiconductor Engineering
|
||||
- VLSI Design
|
||||
- Mathematics
|
||||
- Electronics
|
||||
- Physics
|
||||
- Problem Solving
|
||||
- Technical Documentation
|
||||
- AI Research Assistance
|
||||
|
||||
---
|
||||
|
||||
# Model Details
|
||||
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| Model Name | Harness-1B |
|
||||
| Organization | Algo Science Lab |
|
||||
| Hugging Face Username | algoscienceacademy |
|
||||
| Parameters | ~1 Billion |
|
||||
| Architecture | Llama-based |
|
||||
| Model Type | Causal Language Model |
|
||||
| Context Length | 2048 Tokens *(or your trained context size)* |
|
||||
| Precision | FP16 / BF16 / GGUF |
|
||||
| Framework | PyTorch |
|
||||
| License | Apache-2.0 |
|
||||
|
||||
---
|
||||
|
||||
# Intended Uses
|
||||
|
||||
Harness-1B is designed for:
|
||||
|
||||
- AI Chatbots
|
||||
- Programming Assistant
|
||||
- Educational Applications
|
||||
- Research
|
||||
- Embedded AI
|
||||
- Local AI Deployment
|
||||
- Engineering Assistance
|
||||
- Electronics Design
|
||||
- FPGA Development
|
||||
- ASIC/VLSI Workflow
|
||||
- RTL Development
|
||||
- Automation
|
||||
- Documentation
|
||||
|
||||
---
|
||||
|
||||
# Example
|
||||
|
||||
```python
|
||||
from transformers import pipeline
|
||||
|
||||
pipe = pipeline(
|
||||
"text-generation",
|
||||
model="algoscienceacademy/Harness-1B",
|
||||
device_map="auto"
|
||||
)
|
||||
|
||||
messages = [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "You are Harness, an AI assistant created by Algo Science Lab."
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": "Write a Python program to print Fibonacci numbers."
|
||||
}
|
||||
]
|
||||
|
||||
prompt = pipe.tokenizer.apply_chat_template(
|
||||
messages,
|
||||
tokenize=False,
|
||||
add_generation_prompt=True
|
||||
)
|
||||
|
||||
output = pipe(
|
||||
prompt,
|
||||
max_new_tokens=256,
|
||||
temperature=0.7,
|
||||
)
|
||||
|
||||
print(output[0]["generated_text"])
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# GGUF Usage
|
||||
|
||||
Harness-1B is also available in GGUF format for:
|
||||
|
||||
- llama.cpp
|
||||
- LM Studio
|
||||
- Jan
|
||||
- Open WebUI
|
||||
- KoboldCpp
|
||||
- Ollama (after conversion)
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
./main \
|
||||
-m Harness-1B-Q4_K_M.gguf \
|
||||
-p "Explain CMOS Inverter."
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Training
|
||||
|
||||
Harness-1B is trained and fine-tuned using open-source datasets and instruction-following techniques.
|
||||
|
||||
Possible data sources include:
|
||||
|
||||
- SlimPajama
|
||||
- StarCoderData
|
||||
- UltraChat
|
||||
- UltraFeedback
|
||||
|
||||
Additional custom datasets may have been used during supervised fine-tuning.
|
||||
|
||||
---
|
||||
|
||||
# Capabilities
|
||||
|
||||
Harness-1B can:
|
||||
|
||||
- Answer questions
|
||||
- Explain concepts
|
||||
- Generate code
|
||||
- Debug code
|
||||
- Write documentation
|
||||
- Solve mathematics
|
||||
- Explain algorithms
|
||||
- Assist with VLSI
|
||||
- Help with FPGA design
|
||||
- Generate Verilog
|
||||
- Generate SystemVerilog
|
||||
- Produce technical reports
|
||||
|
||||
---
|
||||
|
||||
# Limitations
|
||||
|
||||
Harness-1B may:
|
||||
|
||||
- Produce incorrect information.
|
||||
- Generate outdated knowledge.
|
||||
- Make reasoning mistakes.
|
||||
- Require verification for safety-critical applications.
|
||||
- Require human review for production environments.
|
||||
|
||||
---
|
||||
|
||||
# Hardware Requirements
|
||||
|
||||
Recommended:
|
||||
|
||||
- 8 GB RAM (Q4 GGUF)
|
||||
- 12 GB RAM (Q6 GGUF)
|
||||
- 16 GB RAM (FP16)
|
||||
- CUDA GPU recommended but optional
|
||||
|
||||
---
|
||||
|
||||
# Citation
|
||||
|
||||
```bibtex
|
||||
@misc{Harness1B,
|
||||
title={Harness-1B},
|
||||
author={Algo Science Lab},
|
||||
year={2026},
|
||||
publisher={Hugging Face},
|
||||
howpublished={https://huggingface.co/algoscienceacademy/Harness-1B}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# License
|
||||
|
||||
Apache License 2.0
|
||||
|
||||
---
|
||||
|
||||
# Acknowledgements
|
||||
|
||||
Harness-1B builds upon open-source language model research and would not be possible without the work of the open-source AI community, including:
|
||||
|
||||
- Meta AI (Llama Architecture)
|
||||
- TinyLlama Project
|
||||
- Hugging Face
|
||||
- PyTorch
|
||||
- Transformers
|
||||
- llama.cpp
|
||||
|
||||
---
|
||||
|
||||
# Contact
|
||||
|
||||
**Organization:** Algo Science Lab
|
||||
|
||||
**Hugging Face:** https://huggingface.co/algoscienceacademy
|
||||
|
||||
---
|
||||
|
||||
Made with ❤️ by Algo Science Lab.
|
||||
26
config.json
Normal file
26
config.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"architectures": [
|
||||
"LlamaForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 2,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 2048,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 5632,
|
||||
"max_position_embeddings": 2048,
|
||||
"model_type": "llama",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 22,
|
||||
"num_key_value_heads": 4,
|
||||
"pretraining_tp": 1,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 10000.0,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.35.0",
|
||||
"use_cache": true,
|
||||
"vocab_size": 32000
|
||||
}
|
||||
16
eval_results.json
Normal file
16
eval_results.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"epoch": 3.0,
|
||||
"eval_logits/chosen": -2.707406759262085,
|
||||
"eval_logits/rejected": -2.656524419784546,
|
||||
"eval_logps/chosen": -370.1297607421875,
|
||||
"eval_logps/rejected": -296.0738525390625,
|
||||
"eval_loss": 0.513750433921814,
|
||||
"eval_rewards/accuracies": 0.738095223903656,
|
||||
"eval_rewards/chosen": -0.02744222804903984,
|
||||
"eval_rewards/margins": 1.0087225437164307,
|
||||
"eval_rewards/rejected": -1.03616464138031,
|
||||
"eval_runtime": 93.5908,
|
||||
"eval_samples": 2000,
|
||||
"eval_samples_per_second": 21.37,
|
||||
"eval_steps_per_second": 0.673
|
||||
}
|
||||
7
generation_config.json
Normal file
7
generation_config.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 2,
|
||||
"max_length": 2048,
|
||||
"pad_token_id": 0,
|
||||
"transformers_version": "4.35.0"
|
||||
}
|
||||
3
harness_f16.gguf
Normal file
3
harness_f16.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6407580ae6ef681cea821be24197c42b4be731ff1e057ed1b07178fde317a268
|
||||
size 2201018624
|
||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6e6001da2106d4757498752a021df6c2bdc332c650aae4bae6b0c004dcf14933
|
||||
size 2200119864
|
||||
30
special_tokens_map.json
Normal file
30
special_tokens_map.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"unk_token": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
93391
tokenizer.json
Normal file
93391
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
tokenizer.model
(Stored with Git LFS)
Normal file
BIN
tokenizer.model
(Stored with Git LFS)
Normal file
Binary file not shown.
40
tokenizer_config.json
Normal file
40
tokenizer_config.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"2": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"bos_token": "<s>",
|
||||
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "</s>",
|
||||
"legacy": false,
|
||||
"model_max_length": 2048,
|
||||
"pad_token": "</s>",
|
||||
"padding_side": "right",
|
||||
"sp_model_kwargs": {},
|
||||
"tokenizer_class": "LlamaTokenizer",
|
||||
"unk_token": "<unk>",
|
||||
"use_default_system_prompt": false
|
||||
}
|
||||
Reference in New Issue
Block a user