Instructions to use llmware/dragon-yi-1.5v-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmware/dragon-yi-1.5v-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="llmware/dragon-yi-1.5v-9b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("llmware/dragon-yi-1.5v-9b") model = AutoModelForCausalLM.from_pretrained("llmware/dragon-yi-1.5v-9b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use llmware/dragon-yi-1.5v-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "llmware/dragon-yi-1.5v-9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llmware/dragon-yi-1.5v-9b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/llmware/dragon-yi-1.5v-9b
- SGLang
How to use llmware/dragon-yi-1.5v-9b 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 "llmware/dragon-yi-1.5v-9b" \ --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": "llmware/dragon-yi-1.5v-9b", "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 "llmware/dragon-yi-1.5v-9b" \ --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": "llmware/dragon-yi-1.5v-9b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use llmware/dragon-yi-1.5v-9b with Docker Model Runner:
docker model run hf.co/llmware/dragon-yi-1.5v-9b
Upload 5 files
Browse files- config.json +89 -0
- generation_config.json +7 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +13 -0
config.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"aib_version": "model_archive_072424_yi1-5_9_readgpt_eot_8",
|
| 3 |
+
"training_dataset": [
|
| 4 |
+
"aib_label_samples_739.jsonl"
|
| 5 |
+
],
|
| 6 |
+
"training_timestamp": "Wed Jul 24 13:44:37 2024",
|
| 7 |
+
"training_comments": "yi1-5-9-read-gpt-eot-072424-8",
|
| 8 |
+
"vocab_size": 64000,
|
| 9 |
+
"max_position_embeddings": 4096,
|
| 10 |
+
"hidden_size": 4096,
|
| 11 |
+
"intermediate_size": 11008,
|
| 12 |
+
"num_hidden_layers": 48,
|
| 13 |
+
"num_attention_heads": 32,
|
| 14 |
+
"num_key_value_heads": 4,
|
| 15 |
+
"hidden_act": "silu",
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"rms_norm_eps": 1e-06,
|
| 18 |
+
"pretraining_tp": 1,
|
| 19 |
+
"use_cache": true,
|
| 20 |
+
"rope_theta": 5000000.0,
|
| 21 |
+
"rope_scaling": null,
|
| 22 |
+
"attention_bias": false,
|
| 23 |
+
"attention_dropout": 0.0,
|
| 24 |
+
"return_dict": true,
|
| 25 |
+
"output_hidden_states": false,
|
| 26 |
+
"output_attentions": false,
|
| 27 |
+
"torchscript": false,
|
| 28 |
+
"torch_dtype": "bfloat16",
|
| 29 |
+
"use_bfloat16": false,
|
| 30 |
+
"tf_legacy_loss": false,
|
| 31 |
+
"pruned_heads": {},
|
| 32 |
+
"tie_word_embeddings": false,
|
| 33 |
+
"chunk_size_feed_forward": 0,
|
| 34 |
+
"is_encoder_decoder": false,
|
| 35 |
+
"is_decoder": false,
|
| 36 |
+
"cross_attention_hidden_size": null,
|
| 37 |
+
"add_cross_attention": false,
|
| 38 |
+
"tie_encoder_decoder": false,
|
| 39 |
+
"max_length": 20,
|
| 40 |
+
"min_length": 0,
|
| 41 |
+
"do_sample": false,
|
| 42 |
+
"early_stopping": false,
|
| 43 |
+
"num_beams": 1,
|
| 44 |
+
"num_beam_groups": 1,
|
| 45 |
+
"diversity_penalty": 0.0,
|
| 46 |
+
"temperature": 1.0,
|
| 47 |
+
"top_k": 50,
|
| 48 |
+
"top_p": 1.0,
|
| 49 |
+
"typical_p": 1.0,
|
| 50 |
+
"repetition_penalty": 1.0,
|
| 51 |
+
"length_penalty": 1.0,
|
| 52 |
+
"no_repeat_ngram_size": 0,
|
| 53 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 54 |
+
"bad_words_ids": null,
|
| 55 |
+
"num_return_sequences": 1,
|
| 56 |
+
"output_scores": false,
|
| 57 |
+
"return_dict_in_generate": false,
|
| 58 |
+
"forced_bos_token_id": null,
|
| 59 |
+
"forced_eos_token_id": null,
|
| 60 |
+
"remove_invalid_values": false,
|
| 61 |
+
"exponential_decay_length_penalty": null,
|
| 62 |
+
"suppress_tokens": null,
|
| 63 |
+
"begin_suppress_tokens": null,
|
| 64 |
+
"architectures": [
|
| 65 |
+
"LlamaForCausalLM"
|
| 66 |
+
],
|
| 67 |
+
"finetuning_task": null,
|
| 68 |
+
"id2label": {
|
| 69 |
+
"0": "LABEL_0",
|
| 70 |
+
"1": "LABEL_1"
|
| 71 |
+
},
|
| 72 |
+
"label2id": {
|
| 73 |
+
"LABEL_0": 0,
|
| 74 |
+
"LABEL_1": 1
|
| 75 |
+
},
|
| 76 |
+
"tokenizer_class": null,
|
| 77 |
+
"prefix": null,
|
| 78 |
+
"bos_token_id": 1,
|
| 79 |
+
"pad_token_id": 0,
|
| 80 |
+
"eos_token_id": 2,
|
| 81 |
+
"sep_token_id": null,
|
| 82 |
+
"decoder_start_token_id": null,
|
| 83 |
+
"task_specific_params": null,
|
| 84 |
+
"problem_type": null,
|
| 85 |
+
"_name_or_path": "01-ai/Yi-1.5-9B",
|
| 86 |
+
"transformers_version": "4.38.1",
|
| 87 |
+
"model_type": "llama",
|
| 88 |
+
"trained": "custom training"
|
| 89 |
+
}
|
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.37.2"
|
| 7 |
+
}
|
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 |
+
}
|