Text Generation
Transformers
Safetensors
English
llama
large_language_model
finance
sec_data
continual_pre_training
model_merging
text-generation-inference
Instructions to use arcee-ai/Llama-3-SEC-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arcee-ai/Llama-3-SEC-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arcee-ai/Llama-3-SEC-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("arcee-ai/Llama-3-SEC-Base") model = AutoModelForCausalLM.from_pretrained("arcee-ai/Llama-3-SEC-Base", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arcee-ai/Llama-3-SEC-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arcee-ai/Llama-3-SEC-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcee-ai/Llama-3-SEC-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arcee-ai/Llama-3-SEC-Base
- SGLang
How to use arcee-ai/Llama-3-SEC-Base 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 "arcee-ai/Llama-3-SEC-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcee-ai/Llama-3-SEC-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "arcee-ai/Llama-3-SEC-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcee-ai/Llama-3-SEC-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arcee-ai/Llama-3-SEC-Base with Docker Model Runner:
docker model run hf.co/arcee-ai/Llama-3-SEC-Base
Code Fix for Inference Example (#1)
Browse files- Code Fix for Inference Example (1c64bc5611cca49ab7261c86d3a5bed3e9abf469)
Co-authored-by: Tyler Odenthal <todenthal@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -68,11 +68,11 @@ device = "cuda"
|
|
| 68 |
model_name = "arcee-ai/Llama-3-SEC"
|
| 69 |
|
| 70 |
model = AutoModelForCausalLM.from_pretrained(
|
| 71 |
-
|
| 72 |
torch_dtype="auto",
|
| 73 |
device_map="auto"
|
| 74 |
)
|
| 75 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 76 |
|
| 77 |
prompt = "What are the key regulatory considerations for a company planning to conduct an initial public offering (IPO) in the United States?"
|
| 78 |
messages = [
|
|
|
|
| 68 |
model_name = "arcee-ai/Llama-3-SEC"
|
| 69 |
|
| 70 |
model = AutoModelForCausalLM.from_pretrained(
|
| 71 |
+
model_name,
|
| 72 |
torch_dtype="auto",
|
| 73 |
device_map="auto"
|
| 74 |
)
|
| 75 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 76 |
|
| 77 |
prompt = "What are the key regulatory considerations for a company planning to conduct an initial public offering (IPO) in the United States?"
|
| 78 |
messages = [
|