Instructions to use lionking927/subnet6-l3-01 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lionking927/subnet6-l3-01 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lionking927/subnet6-l3-01") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lionking927/subnet6-l3-01") model = AutoModelForCausalLM.from_pretrained("lionking927/subnet6-l3-01") 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
- vLLM
How to use lionking927/subnet6-l3-01 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lionking927/subnet6-l3-01" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lionking927/subnet6-l3-01", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lionking927/subnet6-l3-01
- SGLang
How to use lionking927/subnet6-l3-01 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 "lionking927/subnet6-l3-01" \ --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": "lionking927/subnet6-l3-01", "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 "lionking927/subnet6-l3-01" \ --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": "lionking927/subnet6-l3-01", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lionking927/subnet6-l3-01 with Docker Model Runner:
docker model run hf.co/lionking927/subnet6-l3-01
Upload LlamaForCausalLM
Browse files- config.json +4 -4
- generation_config.json +2 -1
- 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,12 +1,12 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/workspace/finetuning-subnet/local-models/training/2024-05-
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 100257,
|
| 9 |
-
"eos_token_id":
|
| 10 |
"hidden_act": "silu",
|
| 11 |
"hidden_size": 4096,
|
| 12 |
"initializer_range": 0.02,
|
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"rope_theta": 500000.0,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
-
"transformers_version": "4.
|
| 26 |
-
"use_cache":
|
| 27 |
"vocab_size": 128256
|
| 28 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/workspace/finetuning-subnet/local-models/training/2024-05-19_09-18-21",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 100257,
|
| 9 |
+
"eos_token_id": 100257,
|
| 10 |
"hidden_act": "silu",
|
| 11 |
"hidden_size": 4096,
|
| 12 |
"initializer_range": 0.02,
|
|
|
|
| 22 |
"rope_theta": 500000.0,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
+
"transformers_version": "4.38.0",
|
| 26 |
+
"use_cache": false,
|
| 27 |
"vocab_size": 128256
|
| 28 |
}
|
generation_config.json
CHANGED
|
@@ -2,5 +2,6 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 128000,
|
| 4 |
"eos_token_id": 128001,
|
| 5 |
-
"transformers_version": "4.
|
|
|
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 128000,
|
| 4 |
"eos_token_id": 128001,
|
| 5 |
+
"transformers_version": "4.38.0",
|
| 6 |
+
"use_cache": false
|
| 7 |
}
|
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:f27567747d55aac526332e860b7ed610d1d392ab2c7427480f651c6ca37c42b3
|
| 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:044fe0b09ffc55642557c350f24845961be63ad378e16c5d6c1c39665b8f82c4
|
| 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:df94523b8d24e936f950ad2a8653f42d11b1c32c5edfc220040c20c16fdc13b6
|
| 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:2f71f9fcc33662314156aa13627805cdc45ee78bd0f1e8324595c3cc0483e7ae
|
| 3 |
size 1168138808
|