Instructions to use voidful/llm-codec-librispeech with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use voidful/llm-codec-librispeech with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("voidful/llm-codec") model = PeftModel.from_pretrained(base_model, "voidful/llm-codec-librispeech") - Transformers
How to use voidful/llm-codec-librispeech with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="voidful/llm-codec-librispeech") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("voidful/llm-codec-librispeech") model = AutoModelForCausalLM.from_pretrained("voidful/llm-codec-librispeech") 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
- vLLM
How to use voidful/llm-codec-librispeech with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "voidful/llm-codec-librispeech" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "voidful/llm-codec-librispeech", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/voidful/llm-codec-librispeech
- SGLang
How to use voidful/llm-codec-librispeech 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 "voidful/llm-codec-librispeech" \ --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": "voidful/llm-codec-librispeech", "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 "voidful/llm-codec-librispeech" \ --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": "voidful/llm-codec-librispeech", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use voidful/llm-codec-librispeech with Docker Model Runner:
docker model run hf.co/voidful/llm-codec-librispeech
Training in progress, epoch 2
Browse files- adapter_config.json +4 -11
- adapter_model.safetensors +1 -1
- training_args.bin +1 -1
adapter_config.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"alora_invocation_tokens": null,
|
| 3 |
"alpha_pattern": {},
|
| 4 |
-
"arrow_config": null,
|
| 5 |
"auto_mapping": null,
|
| 6 |
"base_model_name_or_path": "voidful/llm-codec",
|
| 7 |
"bias": "none",
|
| 8 |
"corda_config": null,
|
| 9 |
-
"ensure_weight_tying": false,
|
| 10 |
"eva_config": null,
|
| 11 |
"exclude_modules": null,
|
| 12 |
"fan_in_fan_out": false,
|
|
@@ -23,24 +20,20 @@
|
|
| 23 |
"megatron_core": "megatron.core",
|
| 24 |
"modules_to_save": null,
|
| 25 |
"peft_type": "LORA",
|
| 26 |
-
"peft_version": "0.18.0",
|
| 27 |
-
"qalora_group_size": 16,
|
| 28 |
"r": 64,
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
|
|
|
|
|
|
| 32 |
"q_proj",
|
|
|
|
| 33 |
"o_proj",
|
| 34 |
-
"k_proj",
|
| 35 |
-
"down_proj",
|
| 36 |
"v_proj",
|
| 37 |
-
"
|
| 38 |
-
"gate_proj"
|
| 39 |
],
|
| 40 |
-
"target_parameters": null,
|
| 41 |
"task_type": "CAUSAL_LM",
|
| 42 |
"trainable_token_indices": null,
|
| 43 |
"use_dora": false,
|
| 44 |
-
"use_qalora": false,
|
| 45 |
"use_rslora": false
|
| 46 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"alpha_pattern": {},
|
|
|
|
| 3 |
"auto_mapping": null,
|
| 4 |
"base_model_name_or_path": "voidful/llm-codec",
|
| 5 |
"bias": "none",
|
| 6 |
"corda_config": null,
|
|
|
|
| 7 |
"eva_config": null,
|
| 8 |
"exclude_modules": null,
|
| 9 |
"fan_in_fan_out": false,
|
|
|
|
| 20 |
"megatron_core": "megatron.core",
|
| 21 |
"modules_to_save": null,
|
| 22 |
"peft_type": "LORA",
|
|
|
|
|
|
|
| 23 |
"r": 64,
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
+
"gate_proj",
|
| 28 |
+
"k_proj",
|
| 29 |
"q_proj",
|
| 30 |
+
"up_proj",
|
| 31 |
"o_proj",
|
|
|
|
|
|
|
| 32 |
"v_proj",
|
| 33 |
+
"down_proj"
|
|
|
|
| 34 |
],
|
|
|
|
| 35 |
"task_type": "CAUSAL_LM",
|
| 36 |
"trainable_token_indices": null,
|
| 37 |
"use_dora": false,
|
|
|
|
| 38 |
"use_rslora": false
|
| 39 |
}
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 528550256
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:01f1adfb4d4f0a2f044323aa36e6c31cb24bfadfa7406d2ff26dd9deb8027ff2
|
| 3 |
size 528550256
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5841
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:09ef793003aa3f31e0fa9d57c9998371626de0241ae516edb6c9795266860010
|
| 3 |
size 5841
|