Text Generation
Transformers
Safetensors
PyTorch
lance_ai
gpt
causal-lm
lance-ai
conversational
custom_code
Instructions to use NeuraCraft/Lance-AI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuraCraft/Lance-AI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NeuraCraft/Lance-AI", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("NeuraCraft/Lance-AI", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NeuraCraft/Lance-AI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeuraCraft/Lance-AI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeuraCraft/Lance-AI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NeuraCraft/Lance-AI
- SGLang
How to use NeuraCraft/Lance-AI 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 "NeuraCraft/Lance-AI" \ --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": "NeuraCraft/Lance-AI", "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 "NeuraCraft/Lance-AI" \ --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": "NeuraCraft/Lance-AI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NeuraCraft/Lance-AI with Docker Model Runner:
docker model run hf.co/NeuraCraft/Lance-AI
Commit ·
4c028c0
1
Parent(s): 5eb7ef1
Upload tokenizer
Browse files- added_tokens.json +2 -0
- special_tokens_map.json +16 -0
- tokenizer.json +34 -2
- tokenizer_config.json +20 -0
added_tokens.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
| 2 |
"[PAD]": 50257
|
| 3 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"<ai>": 50259,
|
| 3 |
+
"<user>": 50258,
|
| 4 |
"[PAD]": 50257
|
| 5 |
}
|
special_tokens_map.json
CHANGED
|
@@ -1,4 +1,20 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"bos_token": "<|endoftext|>",
|
| 3 |
"eos_token": "<|endoftext|>",
|
| 4 |
"pad_token": {
|
|
|
|
| 1 |
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
{
|
| 4 |
+
"content": "<user>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"content": "<ai>",
|
| 12 |
+
"lstrip": false,
|
| 13 |
+
"normalized": false,
|
| 14 |
+
"rstrip": false,
|
| 15 |
+
"single_word": false
|
| 16 |
+
}
|
| 17 |
+
],
|
| 18 |
"bos_token": "<|endoftext|>",
|
| 19 |
"eos_token": "<|endoftext|>",
|
| 20 |
"pad_token": {
|
tokenizer.json
CHANGED
|
@@ -1,7 +1,21 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
| 7 |
"id": 50256,
|
|
@@ -20,6 +34,24 @@
|
|
| 20 |
"rstrip": false,
|
| 21 |
"normalized": false,
|
| 22 |
"special": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
}
|
| 24 |
],
|
| 25 |
"normalizer": null,
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": {
|
| 4 |
+
"direction": "Right",
|
| 5 |
+
"max_length": 512,
|
| 6 |
+
"strategy": "LongestFirst",
|
| 7 |
+
"stride": 0
|
| 8 |
+
},
|
| 9 |
+
"padding": {
|
| 10 |
+
"strategy": {
|
| 11 |
+
"Fixed": 512
|
| 12 |
+
},
|
| 13 |
+
"direction": "Right",
|
| 14 |
+
"pad_to_multiple_of": null,
|
| 15 |
+
"pad_id": 50257,
|
| 16 |
+
"pad_type_id": 0,
|
| 17 |
+
"pad_token": "[PAD]"
|
| 18 |
+
},
|
| 19 |
"added_tokens": [
|
| 20 |
{
|
| 21 |
"id": 50256,
|
|
|
|
| 34 |
"rstrip": false,
|
| 35 |
"normalized": false,
|
| 36 |
"special": true
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": 50258,
|
| 40 |
+
"content": "<user>",
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"lstrip": false,
|
| 43 |
+
"rstrip": false,
|
| 44 |
+
"normalized": false,
|
| 45 |
+
"special": true
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"id": 50259,
|
| 49 |
+
"content": "<ai>",
|
| 50 |
+
"single_word": false,
|
| 51 |
+
"lstrip": false,
|
| 52 |
+
"rstrip": false,
|
| 53 |
+
"normalized": false,
|
| 54 |
+
"special": true
|
| 55 |
}
|
| 56 |
],
|
| 57 |
"normalizer": null,
|
tokenizer_config.json
CHANGED
|
@@ -16,8 +16,28 @@
|
|
| 16 |
"rstrip": false,
|
| 17 |
"single_word": false,
|
| 18 |
"special": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
"bos_token": "<|endoftext|>",
|
| 22 |
"clean_up_tokenization_spaces": false,
|
| 23 |
"eos_token": "<|endoftext|>",
|
|
|
|
| 16 |
"rstrip": false,
|
| 17 |
"single_word": false,
|
| 18 |
"special": true
|
| 19 |
+
},
|
| 20 |
+
"50258": {
|
| 21 |
+
"content": "<user>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"50259": {
|
| 29 |
+
"content": "<ai>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
}
|
| 36 |
},
|
| 37 |
+
"additional_special_tokens": [
|
| 38 |
+
"<user>",
|
| 39 |
+
"<ai>"
|
| 40 |
+
],
|
| 41 |
"bos_token": "<|endoftext|>",
|
| 42 |
"clean_up_tokenization_spaces": false,
|
| 43 |
"eos_token": "<|endoftext|>",
|