Text Generation
Transformers
Safetensors
English
French
bitnet
mergekit
Merge
conversational
custom_code
Instructions to use jpacifico/Aramis-2B-BitNet-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jpacifico/Aramis-2B-BitNet-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jpacifico/Aramis-2B-BitNet-bf16", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jpacifico/Aramis-2B-BitNet-bf16", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("jpacifico/Aramis-2B-BitNet-bf16", trust_remote_code=True, 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jpacifico/Aramis-2B-BitNet-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jpacifico/Aramis-2B-BitNet-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jpacifico/Aramis-2B-BitNet-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jpacifico/Aramis-2B-BitNet-bf16
- SGLang
How to use jpacifico/Aramis-2B-BitNet-bf16 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 "jpacifico/Aramis-2B-BitNet-bf16" \ --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": "jpacifico/Aramis-2B-BitNet-bf16", "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 "jpacifico/Aramis-2B-BitNet-bf16" \ --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": "jpacifico/Aramis-2B-BitNet-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jpacifico/Aramis-2B-BitNet-bf16 with Docker Model Runner:
docker model run hf.co/jpacifico/Aramis-2B-BitNet-bf16
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,6 +32,7 @@ Runs natively as BitNet 1.58-bit (ternary) and is available in GGUF 1.58-bit, lo
|
|
| 32 |
- jpacifico/bitnet-dpo-merged-modelstock7 (this repo): Contains the retrainable weights in BF16 format
|
| 33 |
- [jpacifico/bitnet-dpo-fr-i2s-2](https://huggingface.co/jpacifico/bitnet-dpo-fr-i2s-2) : Quantized 1.58-bit GGUF version, you can use with [bitnet.cpp](https://github.com/microsoft/BitNet)
|
| 34 |
|
|
|
|
| 35 |
# Training Recipe
|
| 36 |
|
| 37 |
Base model : [microsoft/bitnet-b1.58-2B-4T-bf16](https://huggingface.co/microsoft/bitnet-b1.58-2B-4T-bf16)
|
|
@@ -43,6 +44,7 @@ Iterative DPO + Model merging :
|
|
| 43 |
[Intel/orca_dpo_pairs](https://huggingface.co/datasets/Intel/orca_dpo_pairs)
|
| 44 |
- Model merging (ModelStock and TIES methods, via [Mergekit](https://github.com/cg123/mergekit) to combine complementary strengths of bilingual models (FR-centric + EN-centric), improving robustness across reasoning and comprehension tasks while maintaining stability.
|
| 45 |
|
|
|
|
| 46 |
# First benchmarks
|
| 47 |
|
| 48 |
**Interpretation:** Significant gains on language understanding & pragmatic reasoning (ARC-C/E, Wino, BoolQ, HellaSwag, TriviaQA) with stability on other skills. Math/code are not the optimization target; GSM8K stays essentially stable relative to the BitNet 1.58-bit quantized baseline (58,38).
|
|
@@ -99,6 +101,8 @@ HF_ALLOW_CODE_EVAL=1 lm-eval --model hf \
|
|
| 99 |
- Randomness (e.g. seeds, batch sizes) may cause slight variations in results
|
| 100 |
- The same procedure was used to evaluate all tasks presented in the benchmark tables
|
| 101 |
|
|
|
|
|
|
|
| 102 |
# Usage with `bitnet.cpp`
|
| 103 |
|
| 104 |
You can run this model using my demo [Colab notebook](https://github.com/jpacifico/) TBD
|
|
@@ -106,6 +110,7 @@ You can run this model using my demo [Colab notebook](https://github.com/jpacifi
|
|
| 106 |
Please refer to the [bitnet.cpp](https://github.com/microsoft/BitNet) GitHub repository for detailed compilation steps, usage examples, and command-line options.
|
| 107 |
|
| 108 |
|
|
|
|
| 109 |
# Last checkpoint
|
| 110 |
### Merge Method
|
| 111 |
|
|
@@ -138,6 +143,7 @@ tokenizer_source: jpacifico/bitnet-dpo-merged-modelstock-retrain
|
|
| 138 |
|
| 139 |
```
|
| 140 |
|
|
|
|
| 141 |
# Limitations
|
| 142 |
|
| 143 |
Not tuned for coding or formal math; prefer specialized variants if those are critical.
|
|
@@ -147,6 +153,7 @@ No explicit chain-of-thought training; improvements come from bilingual DPO + me
|
|
| 147 |
This model is intended for research and development purposes only and should not be used in commercial or real-world applications without further testing. While the Microsoft Research team has applied SFT and DPO to align the BitNet base model, it may still produce unexpected, biased, or inaccurate outputs. Please use responsibly.
|
| 148 |
|
| 149 |
|
|
|
|
| 150 |
- **Developed by:** Jonathan Pacifico, 2025
|
| 151 |
- **Model type:** LLM
|
| 152 |
- **Language(s) (NLP):** French, English
|
|
|
|
| 32 |
- jpacifico/bitnet-dpo-merged-modelstock7 (this repo): Contains the retrainable weights in BF16 format
|
| 33 |
- [jpacifico/bitnet-dpo-fr-i2s-2](https://huggingface.co/jpacifico/bitnet-dpo-fr-i2s-2) : Quantized 1.58-bit GGUF version, you can use with [bitnet.cpp](https://github.com/microsoft/BitNet)
|
| 34 |
|
| 35 |
+
|
| 36 |
# Training Recipe
|
| 37 |
|
| 38 |
Base model : [microsoft/bitnet-b1.58-2B-4T-bf16](https://huggingface.co/microsoft/bitnet-b1.58-2B-4T-bf16)
|
|
|
|
| 44 |
[Intel/orca_dpo_pairs](https://huggingface.co/datasets/Intel/orca_dpo_pairs)
|
| 45 |
- Model merging (ModelStock and TIES methods, via [Mergekit](https://github.com/cg123/mergekit) to combine complementary strengths of bilingual models (FR-centric + EN-centric), improving robustness across reasoning and comprehension tasks while maintaining stability.
|
| 46 |
|
| 47 |
+
|
| 48 |
# First benchmarks
|
| 49 |
|
| 50 |
**Interpretation:** Significant gains on language understanding & pragmatic reasoning (ARC-C/E, Wino, BoolQ, HellaSwag, TriviaQA) with stability on other skills. Math/code are not the optimization target; GSM8K stays essentially stable relative to the BitNet 1.58-bit quantized baseline (58,38).
|
|
|
|
| 101 |
- Randomness (e.g. seeds, batch sizes) may cause slight variations in results
|
| 102 |
- The same procedure was used to evaluate all tasks presented in the benchmark tables
|
| 103 |
|
| 104 |
+
|
| 105 |
+
|
| 106 |
# Usage with `bitnet.cpp`
|
| 107 |
|
| 108 |
You can run this model using my demo [Colab notebook](https://github.com/jpacifico/) TBD
|
|
|
|
| 110 |
Please refer to the [bitnet.cpp](https://github.com/microsoft/BitNet) GitHub repository for detailed compilation steps, usage examples, and command-line options.
|
| 111 |
|
| 112 |
|
| 113 |
+
|
| 114 |
# Last checkpoint
|
| 115 |
### Merge Method
|
| 116 |
|
|
|
|
| 143 |
|
| 144 |
```
|
| 145 |
|
| 146 |
+
|
| 147 |
# Limitations
|
| 148 |
|
| 149 |
Not tuned for coding or formal math; prefer specialized variants if those are critical.
|
|
|
|
| 153 |
This model is intended for research and development purposes only and should not be used in commercial or real-world applications without further testing. While the Microsoft Research team has applied SFT and DPO to align the BitNet base model, it may still produce unexpected, biased, or inaccurate outputs. Please use responsibly.
|
| 154 |
|
| 155 |
|
| 156 |
+
|
| 157 |
- **Developed by:** Jonathan Pacifico, 2025
|
| 158 |
- **Model type:** LLM
|
| 159 |
- **Language(s) (NLP):** French, English
|