Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
unsloth
trl
sft
conversational
Instructions to use skriv/bondlm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use skriv/bondlm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="skriv/bondlm") 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("skriv/bondlm") model = AutoModelForCausalLM.from_pretrained("skriv/bondlm", 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 skriv/bondlm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "skriv/bondlm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "skriv/bondlm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/skriv/bondlm
- SGLang
How to use skriv/bondlm 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 "skriv/bondlm" \ --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": "skriv/bondlm", "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 "skriv/bondlm" \ --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": "skriv/bondlm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use skriv/bondlm with Docker Model Runner:
docker model run hf.co/skriv/bondlm
Trained with Unsloth
Browse files- config.json +14 -8
- generation_config.json +3 -2
- model-00001-of-00004.safetensors +1 -1
- model-00002-of-00004.safetensors +1 -1
- model-00003-of-00004.safetensors +1 -1
- model-00004-of-00004.safetensors +1 -1
config.json
CHANGED
|
@@ -1,36 +1,42 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "unsloth/
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 128000,
|
| 9 |
-
"eos_token_id":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
"head_dim": 128,
|
| 11 |
"hidden_act": "silu",
|
| 12 |
"hidden_size": 4096,
|
| 13 |
"initializer_range": 0.02,
|
| 14 |
"intermediate_size": 14336,
|
| 15 |
-
"max_position_embeddings":
|
| 16 |
"mlp_bias": false,
|
| 17 |
"model_type": "llama",
|
| 18 |
"num_attention_heads": 32,
|
| 19 |
"num_hidden_layers": 32,
|
| 20 |
"num_key_value_heads": 8,
|
| 21 |
-
"pad_token_id":
|
| 22 |
"pretraining_tp": 1,
|
| 23 |
"rms_norm_eps": 1e-05,
|
| 24 |
"rope_scaling": {
|
| 25 |
-
"factor":
|
| 26 |
-
"
|
| 27 |
-
"
|
|
|
|
|
|
|
| 28 |
},
|
| 29 |
"rope_theta": 500000.0,
|
| 30 |
"tie_word_embeddings": false,
|
| 31 |
"torch_dtype": "bfloat16",
|
| 32 |
"transformers_version": "4.47.1",
|
| 33 |
-
"unsloth_version": "
|
| 34 |
"use_cache": true,
|
| 35 |
"vocab_size": 128256
|
| 36 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 128000,
|
| 9 |
+
"eos_token_id": [
|
| 10 |
+
128001,
|
| 11 |
+
128008,
|
| 12 |
+
128009
|
| 13 |
+
],
|
| 14 |
"head_dim": 128,
|
| 15 |
"hidden_act": "silu",
|
| 16 |
"hidden_size": 4096,
|
| 17 |
"initializer_range": 0.02,
|
| 18 |
"intermediate_size": 14336,
|
| 19 |
+
"max_position_embeddings": 131072,
|
| 20 |
"mlp_bias": false,
|
| 21 |
"model_type": "llama",
|
| 22 |
"num_attention_heads": 32,
|
| 23 |
"num_hidden_layers": 32,
|
| 24 |
"num_key_value_heads": 8,
|
| 25 |
+
"pad_token_id": 128004,
|
| 26 |
"pretraining_tp": 1,
|
| 27 |
"rms_norm_eps": 1e-05,
|
| 28 |
"rope_scaling": {
|
| 29 |
+
"factor": 8.0,
|
| 30 |
+
"high_freq_factor": 4.0,
|
| 31 |
+
"low_freq_factor": 1.0,
|
| 32 |
+
"original_max_position_embeddings": 8192,
|
| 33 |
+
"rope_type": "llama3"
|
| 34 |
},
|
| 35 |
"rope_theta": 500000.0,
|
| 36 |
"tie_word_embeddings": false,
|
| 37 |
"torch_dtype": "bfloat16",
|
| 38 |
"transformers_version": "4.47.1",
|
| 39 |
+
"unsloth_version": "2025.1.5",
|
| 40 |
"use_cache": true,
|
| 41 |
"vocab_size": 128256
|
| 42 |
}
|
generation_config.json
CHANGED
|
@@ -3,10 +3,11 @@
|
|
| 3 |
"do_sample": true,
|
| 4 |
"eos_token_id": [
|
| 5 |
128001,
|
|
|
|
| 6 |
128009
|
| 7 |
],
|
| 8 |
-
"max_length":
|
| 9 |
-
"pad_token_id":
|
| 10 |
"temperature": 0.6,
|
| 11 |
"top_p": 0.9,
|
| 12 |
"transformers_version": "4.47.1"
|
|
|
|
| 3 |
"do_sample": true,
|
| 4 |
"eos_token_id": [
|
| 5 |
128001,
|
| 6 |
+
128008,
|
| 7 |
128009
|
| 8 |
],
|
| 9 |
+
"max_length": 131072,
|
| 10 |
+
"pad_token_id": 128004,
|
| 11 |
"temperature": 0.6,
|
| 12 |
"top_p": 0.9,
|
| 13 |
"transformers_version": "4.47.1"
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4976698672
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56cef4a191d853b71ceec0e01b85738d9421a2d48d7b38793c419c431231b2e8
|
| 3 |
size 4976698672
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999802720
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ad771eb8c3cebc35f72e6f26db3dd0a3a8bb01f7764de136963182c3857ad7a
|
| 3 |
size 4999802720
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4915916176
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8afe1b1680b1384dbf3c91ac5f08f28d47cf8c125966701dd040ad4558d313ab
|
| 3 |
size 4915916176
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1168138808
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:299045cd1b7244d4b28041f9a08b375223f5a903aa6f585a1957e3dde2b4008b
|
| 3 |
size 1168138808
|