Instructions to use hammeiam/bt_nous with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hammeiam/bt_nous with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hammeiam/bt_nous") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hammeiam/bt_nous") model = AutoModelForCausalLM.from_pretrained("hammeiam/bt_nous") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hammeiam/bt_nous with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hammeiam/bt_nous" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hammeiam/bt_nous", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hammeiam/bt_nous
- SGLang
How to use hammeiam/bt_nous 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 "hammeiam/bt_nous" \ --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": "hammeiam/bt_nous", "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 "hammeiam/bt_nous" \ --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": "hammeiam/bt_nous", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hammeiam/bt_nous with Docker Model Runner:
docker model run hf.co/hammeiam/bt_nous
Upload LlamaForCausalLM
Browse files- config.json +13 -12
- generation_config.json +3 -2
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
config.json
CHANGED
|
@@ -1,28 +1,29 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/finetuning-subnet/local-models/training/2024-02-
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 1,
|
| 9 |
-
"eos_token_id":
|
| 10 |
"hidden_act": "silu",
|
| 11 |
-
"hidden_size":
|
| 12 |
-
"initializer_range": 0.
|
| 13 |
-
"intermediate_size":
|
| 14 |
-
"max_position_embeddings":
|
| 15 |
"model_type": "llama",
|
| 16 |
-
"num_attention_heads":
|
| 17 |
-
"num_hidden_layers":
|
| 18 |
-
"num_key_value_heads":
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
-
"rms_norm_eps": 1e-
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 10000.0,
|
|
|
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.36.2",
|
| 26 |
-
"use_cache":
|
| 27 |
-
"vocab_size":
|
| 28 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/workspace/finetuning-subnet/local-models/training/2024-02-02_20-08-57",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 1,
|
| 9 |
+
"eos_token_id": 32000,
|
| 10 |
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 14336,
|
| 14 |
+
"max_position_embeddings": 32768,
|
| 15 |
"model_type": "llama",
|
| 16 |
+
"num_attention_heads": 32,
|
| 17 |
+
"num_hidden_layers": 32,
|
| 18 |
+
"num_key_value_heads": 8,
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
+
"rms_norm_eps": 1e-05,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 10000.0,
|
| 23 |
+
"sliding_window": 4096,
|
| 24 |
"tie_word_embeddings": false,
|
| 25 |
"torch_dtype": "bfloat16",
|
| 26 |
"transformers_version": "4.36.2",
|
| 27 |
+
"use_cache": false,
|
| 28 |
+
"vocab_size": 32002
|
| 29 |
}
|
generation_config.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
-
"eos_token_id":
|
| 5 |
-
"transformers_version": "4.36.2"
|
|
|
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 32000,
|
| 5 |
+
"transformers_version": "4.36.2",
|
| 6 |
+
"use_cache": false
|
| 7 |
}
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4943178720
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:99f3bb3e5a48e0f42247efef78c0d90faa3593af23d0a5a291fe6d1a0697a3a0
|
| 3 |
size 4943178720
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999819336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dfcbebccb716305c7d00b7de57517f4b763f0864aa3814fe7604e344cde75191
|
| 3 |
size 4999819336
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4540532728
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f040653bfd3b85daeb3970904cff5ff783cd322bfc1cbdda4309cc2e324ec38
|
| 3 |
size 4540532728
|