Text Generation
Transformers
Safetensors
English
llama
bitnet
open-source
cosmopedia
text-generation-inference
Instructions to use abideen/Bitnet-Llama-70M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abideen/Bitnet-Llama-70M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abideen/Bitnet-Llama-70M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abideen/Bitnet-Llama-70M") model = AutoModelForCausalLM.from_pretrained("abideen/Bitnet-Llama-70M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use abideen/Bitnet-Llama-70M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abideen/Bitnet-Llama-70M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abideen/Bitnet-Llama-70M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/abideen/Bitnet-Llama-70M
- SGLang
How to use abideen/Bitnet-Llama-70M 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 "abideen/Bitnet-Llama-70M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abideen/Bitnet-Llama-70M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "abideen/Bitnet-Llama-70M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abideen/Bitnet-Llama-70M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use abideen/Bitnet-Llama-70M with Docker Model Runner:
docker model run hf.co/abideen/Bitnet-Llama-70M
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,9 +17,9 @@ tags:
|
|
| 17 |
|
| 18 |
Bitnet-LLama-70M is a 70M parameter model trained using the method described in [The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits](https://arxiv.org/abs/2402.17764).
|
| 19 |
|
| 20 |
-
It was trained on the subset of the [HuggingFaceTB/cosmopedia](https://huggingface.co/datasets/HuggingFaceTB/cosmopedia) dataset. This is just a small experiment to try out BitNet.
|
| 21 |
|
| 22 |
-
|
| 23 |
|
| 24 |
Wandb training report is as follows:
|
| 25 |
|
|
|
|
| 17 |
|
| 18 |
Bitnet-LLama-70M is a 70M parameter model trained using the method described in [The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits](https://arxiv.org/abs/2402.17764).
|
| 19 |
|
| 20 |
+
It was trained on the subset of the [HuggingFaceTB/cosmopedia](https://huggingface.co/datasets/HuggingFaceTB/cosmopedia) dataset. This is just a small experiment to try out BitNet. Bitnet-LLama-70M was trained for 2 epochs on 1xA100.
|
| 21 |
|
| 22 |
+
This model is just an experiment and you might not get good results while chatting with it due to smaller model size and less training.
|
| 23 |
|
| 24 |
Wandb training report is as follows:
|
| 25 |
|