Instructions to use firef1i/finbasic2-llama2-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use firef1i/finbasic2-llama2-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="firef1i/finbasic2-llama2-13b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("firef1i/finbasic2-llama2-13b") model = AutoModelForCausalLM.from_pretrained("firef1i/finbasic2-llama2-13b") 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 firef1i/finbasic2-llama2-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "firef1i/finbasic2-llama2-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "firef1i/finbasic2-llama2-13b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/firef1i/finbasic2-llama2-13b
- SGLang
How to use firef1i/finbasic2-llama2-13b 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 "firef1i/finbasic2-llama2-13b" \ --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": "firef1i/finbasic2-llama2-13b", "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 "firef1i/finbasic2-llama2-13b" \ --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": "firef1i/finbasic2-llama2-13b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use firef1i/finbasic2-llama2-13b with Docker Model Runner:
docker model run hf.co/firef1i/finbasic2-llama2-13b
Upload LlamaForCausalLM
Browse files- model-00001-of-00011.safetensors +1 -1
- model-00002-of-00011.safetensors +1 -1
- model-00003-of-00011.safetensors +1 -1
- model-00004-of-00011.safetensors +1 -1
- model-00005-of-00011.safetensors +1 -1
- model-00006-of-00011.safetensors +1 -1
- model-00007-of-00011.safetensors +1 -1
- model-00008-of-00011.safetensors +1 -1
- model-00009-of-00011.safetensors +1 -1
- model-00010-of-00011.safetensors +1 -1
- model-00011-of-00011.safetensors +1 -1
model-00001-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4881247856
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1cfaea997c0ae483390c744cf1e6e78e255e3801a3b814a981c21e35a4e4350e
|
| 3 |
size 4881247856
|
model-00002-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4970418112
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0956f0c230d8671cb8787430a176010eb180b111d2736cb72a61db5e3d3fffd3
|
| 3 |
size 4970418112
|
model-00003-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4970418120
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e585983544a145ab97273b62d54f9b32ce4df1e70cc928259f8e64dfa2c675e7
|
| 3 |
size 4970418120
|
model-00004-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4970418144
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:984ae26d403e2e9206a54a02aa60d5559924d8635596db67c7704621a4586eb0
|
| 3 |
size 4970418144
|
model-00005-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4970418144
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c96e5a8173ab85667eaa5fdacbbe817296e2c780cbf3030e9e2a9835c3b17fd3
|
| 3 |
size 4970418144
|
model-00006-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4792119040
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab7546cd4dfb9bfb6fd973700ce19d2195d52f6466f8585da2ee350883c0fc0d
|
| 3 |
size 4792119040
|
model-00007-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4792160232
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e027fc30c05e813cd12713fd009eda25a35a38af90d7e7fb09600fe1d7531390
|
| 3 |
size 4792160232
|
model-00008-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4792160224
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ae5c3c72e309e370e58e2f53ae444835e1074a54ac78afd29dcd21370b65b51
|
| 3 |
size 4792160224
|
model-00009-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4970418144
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41c8725dac1e2c2bea185aa6975ff026d47d40b4664fab5eaaa96c7360782c9d
|
| 3 |
size 4970418144
|
model-00010-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4970418144
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:531ca832f564bcb0220b95b12025a2bda8422857d97f2cc4863a74d0cc167454
|
| 3 |
size 4970418144
|
model-00011-of-00011.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2983303184
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:83c1ce98ede06bdd45c9de44772da92d16053a131e39d89e8220ab8497595c57
|
| 3 |
size 2983303184
|