Llama2 7B
Open weights
API id
llama2:7bInput / 1M
-
not listed
Output / 1M
-
not listed
Context window
4K
tokens
Max output
4K
tokens per reply
Hosts
0
1 listings
Released
-
date not published
Where to run it
0 hosts serve Llama2 7B. The comparison is on blended price, 3 parts input to 1 part output.
| Host | In / out per 1M | Model id | |
|---|---|---|---|
OllamaLocal llama2:7b | - | llama2:7b |
Capabilities
Core
- Streaming
- Function calling
- JSON mode
- Structured outputs
Multimodal
- Vision
- Image input
- Audio
- Image generation
- Video
Advanced
- Reasoning
- Tool calling
- MCP
- Prompt caching
- Batch API
- Embeddings
- Takes in
- Text
- Produces
- Text
- Open weights
- License: Llama Community LicenseRuntimes: Ollama, TGI, llama.cpp, vLLM
Similar models
This model has no listed price, so these are current models with similar capabilities.
Smaller Meta models
Other frontier labs
Open-weight picks
Model line
Newer and older versions, at each lab's own price.
- UndatedLlama 2 7BLatest$0.05 / $0.25
- UndatedLlama2 7BThis pageNot listed
Call it
Using Ollama's API.
Python
from litellm import completion
response = completion(
model="ollama/llama2:7b",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Quick answers
What is Llama2 7B's context window?
4K tokens, with up to 4K tokens in one reply.
Is there a newer version of Llama2 7B?
Yes. Llama 2 7B is the newest model in this line.
What is Llama2 7B's API model id?
Use llama2:7b with Ollama.
Sources
Raw catalog entry for llama2:7b on Ollama
{
"input_cost_per_token": 0,
"litellm_provider": "ollama",
"max_input_tokens": 4096,
"max_output_tokens": 4096,
"mode": "chat",
"output_cost_per_token": 0
}