Text Generation
Transformers
Safetensors
llama
facebook
meta
llama-2
conversational
text-generation-inference
aqlm
Instructions to use justheuristic/test-1bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use justheuristic/test-1bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="justheuristic/test-1bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("justheuristic/test-1bit") model = AutoModelForCausalLM.from_pretrained("justheuristic/test-1bit") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use justheuristic/test-1bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "justheuristic/test-1bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "justheuristic/test-1bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/justheuristic/test-1bit
- SGLang
How to use justheuristic/test-1bit 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 "justheuristic/test-1bit" \ --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": "justheuristic/test-1bit", "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 "justheuristic/test-1bit" \ --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": "justheuristic/test-1bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use justheuristic/test-1bit with Docker Model Runner:
docker model run hf.co/justheuristic/test-1bit
Commit ·
8a8b4d9
1
Parent(s): 21b135a
1bit test
Browse files- config.json +3 -3
- generation_config.json +1 -1
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
@@ -18,7 +18,7 @@
|
|
| 18 |
"num_key_value_heads": 32,
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
"quantization_config": {
|
| 21 |
-
"in_group_size":
|
| 22 |
"linear_weights_not_to_quantize": [
|
| 23 |
"model.layers.0.input_layernorm.weight",
|
| 24 |
"model.layers.0.post_attention_layernorm.weight",
|
|
@@ -98,7 +98,7 @@
|
|
| 98 |
"rope_theta": 10000.0,
|
| 99 |
"tie_word_embeddings": false,
|
| 100 |
"torch_dtype": "float16",
|
| 101 |
-
"transformers_version": "4.
|
| 102 |
"use_cache": true,
|
| 103 |
"vocab_size": 32000
|
| 104 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "converted_llama2",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
| 18 |
"num_key_value_heads": 32,
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
"quantization_config": {
|
| 21 |
+
"in_group_size": 16,
|
| 22 |
"linear_weights_not_to_quantize": [
|
| 23 |
"model.layers.0.input_layernorm.weight",
|
| 24 |
"model.layers.0.post_attention_layernorm.weight",
|
|
|
|
| 98 |
"rope_theta": 10000.0,
|
| 99 |
"tie_word_embeddings": false,
|
| 100 |
"torch_dtype": "float16",
|
| 101 |
+
"transformers_version": "4.40.1",
|
| 102 |
"use_cache": true,
|
| 103 |
"vocab_size": 32000
|
| 104 |
}
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
-
"transformers_version": "4.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
+
"transformers_version": "4.40.1"
|
| 6 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82fbc31138dbee9afcb8658b27ed77b5ad9bc47a4257c4111dd35ea96e28b70c
|
| 3 |
+
size 1806888664
|