Instructions to use cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence") model = AutoModelForCausalLM.from_pretrained("cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence
- SGLang
How to use cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence 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 "cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence" \ --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": "cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence", "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 "cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence" \ --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": "cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence with Docker Model Runner:
docker model run hf.co/cross-ling-know/llama2-7b-wiki2-mixed-lang-sentence
- Xet hash:
- dc543d313a252a08dc96232d527678a603fc917cf62e805050e8042bf2d27682
- Size of remote file:
- 4.86 GB
- SHA256:
- f48f5cbf447db6dea1f549d103d4fc060c07c725e74e81dd289d6506ba580fe0
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.