Instructions to use BAAI/Infinity-Instruct-3M-0625-Llama3-70B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BAAI/Infinity-Instruct-3M-0625-Llama3-70B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BAAI/Infinity-Instruct-3M-0625-Llama3-70B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BAAI/Infinity-Instruct-3M-0625-Llama3-70B") model = AutoModelForCausalLM.from_pretrained("BAAI/Infinity-Instruct-3M-0625-Llama3-70B", device_map="auto") 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 Settings
- vLLM
How to use BAAI/Infinity-Instruct-3M-0625-Llama3-70B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BAAI/Infinity-Instruct-3M-0625-Llama3-70B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BAAI/Infinity-Instruct-3M-0625-Llama3-70B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BAAI/Infinity-Instruct-3M-0625-Llama3-70B
- SGLang
How to use BAAI/Infinity-Instruct-3M-0625-Llama3-70B 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 "BAAI/Infinity-Instruct-3M-0625-Llama3-70B" \ --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": "BAAI/Infinity-Instruct-3M-0625-Llama3-70B", "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 "BAAI/Infinity-Instruct-3M-0625-Llama3-70B" \ --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": "BAAI/Infinity-Instruct-3M-0625-Llama3-70B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use BAAI/Infinity-Instruct-3M-0625-Llama3-70B with Docker Model Runner:
docker model run hf.co/BAAI/Infinity-Instruct-3M-0625-Llama3-70B
Upload md5 with huggingface_hub
Browse files
md5
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
26c9bc2b53c372a4207dac1fc6cc75fb config.json
|
| 2 |
+
efead4b67f76b346233b74441c632ad2 generation_config.json
|
| 3 |
+
c7cb1e5634f9e88925a27e07d2cfd687 model-00001-of-00030.safetensors
|
| 4 |
+
f64fa24cb6ed2dd933d35884782b66cf model-00002-of-00030.safetensors
|
| 5 |
+
d3518419098ee2f9ee2473c92cae7b05 model-00003-of-00030.safetensors
|
| 6 |
+
b4ff6034f395696ba28920aa65f1cab1 model-00004-of-00030.safetensors
|
| 7 |
+
b0564c67ac04392cae9d63a2e7118386 model-00005-of-00030.safetensors
|
| 8 |
+
2d70116df47cb2f13afa62d4470b1b78 model-00006-of-00030.safetensors
|
| 9 |
+
2ab0a6a4cb3c75998f0af25021fe85a2 model-00007-of-00030.safetensors
|
| 10 |
+
7fa2600237bc95fa80985cd387b83af5 model-00008-of-00030.safetensors
|
| 11 |
+
a6608a97bfdc8d384bdaca9e2deb2624 model-00009-of-00030.safetensors
|
| 12 |
+
6b78860931a0cbd64561252616643ca6 model-00010-of-00030.safetensors
|
| 13 |
+
2ddbebf4724213a64375a4af400f0d7b model-00011-of-00030.safetensors
|
| 14 |
+
3bbc9a4ddb0e04eeedb19bc87e05a7ee model-00012-of-00030.safetensors
|
| 15 |
+
41a4bf26c9aa216d23a5377f15ec1b46 model-00013-of-00030.safetensors
|
| 16 |
+
43c6ade83c5768dea4ee4c6dd2b41816 model-00014-of-00030.safetensors
|
| 17 |
+
8226e06487496a0afa976527842ca424 model-00015-of-00030.safetensors
|
| 18 |
+
b2297851179161b4945fac56c9bc614a model-00016-of-00030.safetensors
|
| 19 |
+
2126ca3272b0f5fad634ecdce5219240 model-00017-of-00030.safetensors
|
| 20 |
+
e02aa03bdafe74b2b5dc39eed32ff2c2 model-00018-of-00030.safetensors
|
| 21 |
+
db34f57ee81166aa9f922626beb6d532 model-00019-of-00030.safetensors
|
| 22 |
+
4cb63d1536b09057f97b894a0d91190f model-00020-of-00030.safetensors
|
| 23 |
+
7b542bf639d51b4b960a2e2bb3635f50 model-00021-of-00030.safetensors
|
| 24 |
+
19362397ff1b128deae1621af5958dc4 model-00022-of-00030.safetensors
|
| 25 |
+
4beaa95dd4407bc00aa268ef402b9f15 model-00023-of-00030.safetensors
|
| 26 |
+
f1b96566d72a1a75002db06f1a6eaea8 model-00024-of-00030.safetensors
|
| 27 |
+
4bb7dcbce811875b66608673ee1a0a11 model-00025-of-00030.safetensors
|
| 28 |
+
6d126614d683e85a25262aaabf174c7b model-00026-of-00030.safetensors
|
| 29 |
+
4596efeedc9010207be98eefbdeae823 model-00027-of-00030.safetensors
|
| 30 |
+
133935d3d2cd4641b4b0c52a1025c1e1 model-00028-of-00030.safetensors
|
| 31 |
+
561f968996d676d21fa7014be09b2ca9 model-00029-of-00030.safetensors
|
| 32 |
+
dca9edb51f691c332fafe422d556c919 model-00030-of-00030.safetensors
|
| 33 |
+
619befe5bfadf56a2f8b435bc3b27fbe model.safetensors.index.json
|
| 34 |
+
33451ef46cbf550462128da373a66286 special_tokens_map.json
|
| 35 |
+
ffcc9f7b5ef2191d144802baa72b1d3a tokenizer.json
|
| 36 |
+
8443e5855270a6ac6a4516e940f10817 tokenizer_config.json
|