Text Generation
Transformers
Safetensors
sparse_llama
Generated from Trainer
conversational
custom_code
Instructions to use thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24
- SGLang
How to use thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24 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 "thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24" \ --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": "thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24", "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 "thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24" \ --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": "thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24 with Docker Model Runner:
docker model run hf.co/thrunlab/sparse_llama_7b_refined_web_50p_2024-03-24
Training in progress, step 1000
Browse files- adapter_config.json +3 -3
- adapter_model.safetensors +1 -1
- training_args.bin +1 -1
adapter_config.json
CHANGED
|
@@ -19,11 +19,11 @@
|
|
| 19 |
"rank_pattern": {},
|
| 20 |
"revision": null,
|
| 21 |
"target_modules": [
|
| 22 |
-
"
|
| 23 |
"up_proj",
|
| 24 |
"q_proj",
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
],
|
| 28 |
"task_type": "CAUSAL_LM"
|
| 29 |
}
|
|
|
|
| 19 |
"rank_pattern": {},
|
| 20 |
"revision": null,
|
| 21 |
"target_modules": [
|
| 22 |
+
"down_proj",
|
| 23 |
"up_proj",
|
| 24 |
"q_proj",
|
| 25 |
+
"v_proj",
|
| 26 |
+
"gate_proj"
|
| 27 |
],
|
| 28 |
"task_type": "CAUSAL_LM"
|
| 29 |
}
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 252750032
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:167ed9b81c8821119f9ff77cb9484d21e626710622e6c7cd9c1c620a3b461156
|
| 3 |
size 252750032
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6456
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de5d7089c5b16560ea374115bb851d690510fb2d3ff2b940ef3d4b8d5b2620a2
|
| 3 |
size 6456
|