Text Generation
Transformers
PyTorch
Safetensors
English
llama
Eval Results (legacy)
text-generation-inference
Instructions to use lorinma/yi6B_Vicuna with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lorinma/yi6B_Vicuna with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lorinma/yi6B_Vicuna")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lorinma/yi6B_Vicuna") model = AutoModelForCausalLM.from_pretrained("lorinma/yi6B_Vicuna") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lorinma/yi6B_Vicuna with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lorinma/yi6B_Vicuna" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lorinma/yi6B_Vicuna", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lorinma/yi6B_Vicuna
- SGLang
How to use lorinma/yi6B_Vicuna 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 "lorinma/yi6B_Vicuna" \ --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": "lorinma/yi6B_Vicuna", "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 "lorinma/yi6B_Vicuna" \ --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": "lorinma/yi6B_Vicuna", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lorinma/yi6B_Vicuna with Docker Model Runner:
docker model run hf.co/lorinma/yi6B_Vicuna
Upload 10 files
Browse files- added_tokens.json +5 -0
- all_results.json +8 -0
- config.json +28 -0
- generation_config.json +7 -0
- pytorch_model.bin +3 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +13 -0
- train_results.json +8 -0
- trainer_state.json +0 -0
added_tokens.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<unk>": 0,
|
| 3 |
+
"<|endoftext|>": 2,
|
| 4 |
+
"<|startoftext|>": 1
|
| 5 |
+
}
|
all_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 3.0,
|
| 3 |
+
"train_loss": 0.3784581153609504,
|
| 4 |
+
"train_runtime": 122473.9577,
|
| 5 |
+
"train_samples": 93204,
|
| 6 |
+
"train_samples_per_second": 2.24,
|
| 7 |
+
"train_steps_per_second": 0.224
|
| 8 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/data/llm/models/Pretrained/yi-6B/01ai/Yi-6B",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 4096,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 11008,
|
| 13 |
+
"max_position_embeddings": 4096,
|
| 14 |
+
"model_type": "llama",
|
| 15 |
+
"num_attention_heads": 32,
|
| 16 |
+
"num_hidden_layers": 32,
|
| 17 |
+
"num_key_value_heads": 4,
|
| 18 |
+
"pad_token_id": 0,
|
| 19 |
+
"pretraining_tp": 1,
|
| 20 |
+
"rms_norm_eps": 1e-05,
|
| 21 |
+
"rope_scaling": null,
|
| 22 |
+
"rope_theta": 5000000.0,
|
| 23 |
+
"tie_word_embeddings": false,
|
| 24 |
+
"torch_dtype": "bfloat16",
|
| 25 |
+
"transformers_version": "4.34.0",
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"vocab_size": 64000
|
| 28 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.34.0"
|
| 7 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf4392114988bdfa71d68ef881441fa64bbd87b64e90fd2b10c89a48d3c96bd8
|
| 3 |
+
size 12122111662
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:386c49cf943d71aa110361135338c50e38beeff0a66593480421f37b319e1a39
|
| 3 |
+
size 1033105
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"model_max_length": 4096,
|
| 5 |
+
"unk_token": "<unk>",
|
| 6 |
+
"bos_token": "<|startoftext|>",
|
| 7 |
+
"eos_token": "<|endoftext|>",
|
| 8 |
+
"pad_token": "<unk>",
|
| 9 |
+
"sp_model_kwargs": {},
|
| 10 |
+
"clean_up_tokenization_spaces": false,
|
| 11 |
+
"legacy": true,
|
| 12 |
+
"tokenizer_class": "LlamaTokenizer"
|
| 13 |
+
}
|
train_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 3.0,
|
| 3 |
+
"train_loss": 0.3784581153609504,
|
| 4 |
+
"train_runtime": 122473.9577,
|
| 5 |
+
"train_samples": 93204,
|
| 6 |
+
"train_samples_per_second": 2.24,
|
| 7 |
+
"train_steps_per_second": 0.224
|
| 8 |
+
}
|
trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|