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
- 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
Vladimir Malniovskii commited on
Commit ·
0ab711f
1
Parent(s): d67d75c
model upload
Browse files- config.json +104 -0
- generation_config.json +6 -0
- model.safetensors +3 -0
- special_tokens_map.json +23 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +35 -0
config.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "./mnt/out",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"bos_token_id": 1,
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 11008,
|
| 14 |
+
"max_position_embeddings": 4096,
|
| 15 |
+
"model_type": "llama",
|
| 16 |
+
"num_attention_heads": 32,
|
| 17 |
+
"num_hidden_layers": 32,
|
| 18 |
+
"num_key_value_heads": 32,
|
| 19 |
+
"pretraining_tp": 1,
|
| 20 |
+
"quantization_config": {
|
| 21 |
+
"in_group_size": 8,
|
| 22 |
+
"linear_weights_not_to_quantize": [
|
| 23 |
+
"model.layers.0.input_layernorm.weight",
|
| 24 |
+
"model.layers.0.post_attention_layernorm.weight",
|
| 25 |
+
"model.layers.1.input_layernorm.weight",
|
| 26 |
+
"model.layers.1.post_attention_layernorm.weight",
|
| 27 |
+
"model.layers.2.input_layernorm.weight",
|
| 28 |
+
"model.layers.2.post_attention_layernorm.weight",
|
| 29 |
+
"model.layers.3.input_layernorm.weight",
|
| 30 |
+
"model.layers.3.post_attention_layernorm.weight",
|
| 31 |
+
"model.layers.4.input_layernorm.weight",
|
| 32 |
+
"model.layers.4.post_attention_layernorm.weight",
|
| 33 |
+
"model.layers.5.input_layernorm.weight",
|
| 34 |
+
"model.layers.5.post_attention_layernorm.weight",
|
| 35 |
+
"model.layers.6.input_layernorm.weight",
|
| 36 |
+
"model.layers.6.post_attention_layernorm.weight",
|
| 37 |
+
"model.layers.7.input_layernorm.weight",
|
| 38 |
+
"model.layers.7.post_attention_layernorm.weight",
|
| 39 |
+
"model.layers.8.input_layernorm.weight",
|
| 40 |
+
"model.layers.8.post_attention_layernorm.weight",
|
| 41 |
+
"model.layers.9.input_layernorm.weight",
|
| 42 |
+
"model.layers.9.post_attention_layernorm.weight",
|
| 43 |
+
"model.layers.10.input_layernorm.weight",
|
| 44 |
+
"model.layers.10.post_attention_layernorm.weight",
|
| 45 |
+
"model.layers.11.input_layernorm.weight",
|
| 46 |
+
"model.layers.11.post_attention_layernorm.weight",
|
| 47 |
+
"model.layers.12.input_layernorm.weight",
|
| 48 |
+
"model.layers.12.post_attention_layernorm.weight",
|
| 49 |
+
"model.layers.13.input_layernorm.weight",
|
| 50 |
+
"model.layers.13.post_attention_layernorm.weight",
|
| 51 |
+
"model.layers.14.input_layernorm.weight",
|
| 52 |
+
"model.layers.14.post_attention_layernorm.weight",
|
| 53 |
+
"model.layers.15.input_layernorm.weight",
|
| 54 |
+
"model.layers.15.post_attention_layernorm.weight",
|
| 55 |
+
"model.layers.16.input_layernorm.weight",
|
| 56 |
+
"model.layers.16.post_attention_layernorm.weight",
|
| 57 |
+
"model.layers.17.input_layernorm.weight",
|
| 58 |
+
"model.layers.17.post_attention_layernorm.weight",
|
| 59 |
+
"model.layers.18.input_layernorm.weight",
|
| 60 |
+
"model.layers.18.post_attention_layernorm.weight",
|
| 61 |
+
"model.layers.19.input_layernorm.weight",
|
| 62 |
+
"model.layers.19.post_attention_layernorm.weight",
|
| 63 |
+
"model.layers.20.input_layernorm.weight",
|
| 64 |
+
"model.layers.20.post_attention_layernorm.weight",
|
| 65 |
+
"model.layers.21.input_layernorm.weight",
|
| 66 |
+
"model.layers.21.post_attention_layernorm.weight",
|
| 67 |
+
"model.layers.22.input_layernorm.weight",
|
| 68 |
+
"model.layers.22.post_attention_layernorm.weight",
|
| 69 |
+
"model.layers.23.input_layernorm.weight",
|
| 70 |
+
"model.layers.23.post_attention_layernorm.weight",
|
| 71 |
+
"model.layers.24.input_layernorm.weight",
|
| 72 |
+
"model.layers.24.post_attention_layernorm.weight",
|
| 73 |
+
"model.layers.25.input_layernorm.weight",
|
| 74 |
+
"model.layers.25.post_attention_layernorm.weight",
|
| 75 |
+
"model.layers.26.input_layernorm.weight",
|
| 76 |
+
"model.layers.26.post_attention_layernorm.weight",
|
| 77 |
+
"model.layers.27.input_layernorm.weight",
|
| 78 |
+
"model.layers.27.post_attention_layernorm.weight",
|
| 79 |
+
"model.layers.28.input_layernorm.weight",
|
| 80 |
+
"model.layers.28.post_attention_layernorm.weight",
|
| 81 |
+
"model.layers.29.input_layernorm.weight",
|
| 82 |
+
"model.layers.29.post_attention_layernorm.weight",
|
| 83 |
+
"model.layers.30.input_layernorm.weight",
|
| 84 |
+
"model.layers.30.post_attention_layernorm.weight",
|
| 85 |
+
"model.layers.31.input_layernorm.weight",
|
| 86 |
+
"model.layers.31.post_attention_layernorm.weight",
|
| 87 |
+
"model.embed_tokens.weight",
|
| 88 |
+
"model.norm.weight",
|
| 89 |
+
"lm_head.weight"
|
| 90 |
+
],
|
| 91 |
+
"nbits_per_codebook": 16,
|
| 92 |
+
"num_codebooks": 1,
|
| 93 |
+
"out_group_size": 1,
|
| 94 |
+
"quant_method": "aqlm"
|
| 95 |
+
},
|
| 96 |
+
"rms_norm_eps": 1e-05,
|
| 97 |
+
"rope_scaling": null,
|
| 98 |
+
"rope_theta": 10000.0,
|
| 99 |
+
"tie_word_embeddings": false,
|
| 100 |
+
"torch_dtype": "float16",
|
| 101 |
+
"transformers_version": "4.39.3",
|
| 102 |
+
"use_cache": true,
|
| 103 |
+
"vocab_size": 32000
|
| 104 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"transformers_version": "4.39.3"
|
| 6 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f23ce9ab8c51777cf81a0379a985b7d6ee884df5eb5eb87926bc94194a57cc12
|
| 3 |
+
size 2381508056
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "</s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"unk_token": {
|
| 17 |
+
"content": "<unk>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
}
|
| 23 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"bos_token": {
|
| 5 |
+
"__type": "AddedToken",
|
| 6 |
+
"content": "<s>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"clean_up_tokenization_spaces": false,
|
| 13 |
+
"eos_token": {
|
| 14 |
+
"__type": "AddedToken",
|
| 15 |
+
"content": "</s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false
|
| 20 |
+
},
|
| 21 |
+
"legacy": false,
|
| 22 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 23 |
+
"pad_token": null,
|
| 24 |
+
"padding_side": "right",
|
| 25 |
+
"sp_model_kwargs": {},
|
| 26 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 27 |
+
"unk_token": {
|
| 28 |
+
"__type": "AddedToken",
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false
|
| 34 |
+
}
|
| 35 |
+
}
|