Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
unsloth
csm
trl
conversational
Instructions to use GIGAParviz/V-TTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GIGAParviz/V-TTS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GIGAParviz/V-TTS") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GIGAParviz/V-TTS") model = AutoModelForCausalLM.from_pretrained("GIGAParviz/V-TTS") 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 GIGAParviz/V-TTS with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GIGAParviz/V-TTS" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GIGAParviz/V-TTS", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GIGAParviz/V-TTS
- SGLang
How to use GIGAParviz/V-TTS 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 "GIGAParviz/V-TTS" \ --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": "GIGAParviz/V-TTS", "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 "GIGAParviz/V-TTS" \ --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": "GIGAParviz/V-TTS", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use GIGAParviz/V-TTS with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for GIGAParviz/V-TTS to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for GIGAParviz/V-TTS to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for GIGAParviz/V-TTS to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="GIGAParviz/V-TTS", max_seq_length=2048, ) - Docker Model Runner
How to use GIGAParviz/V-TTS with Docker Model Runner:
docker model run hf.co/GIGAParviz/V-TTS
Upload model trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- chat_template.jinja +1 -45
- special_tokens_map.json +0 -0
- tokenizer.json +2 -2
- tokenizer_config.json +0 -0
chat_template.jinja
CHANGED
|
@@ -1,45 +1 @@
|
|
| 1 |
-
|
| 2 |
-
{%- for message in messages %}
|
| 3 |
-
{#-- Validate role is a stringified integer --#}
|
| 4 |
-
{%- if not message['role'] is string or not message['role'].isdigit() %}
|
| 5 |
-
{{- raise_exception("The role must be an integer or a stringified integer (e.g. '0') designating the speaker id") }}
|
| 6 |
-
{%- endif %}
|
| 7 |
-
|
| 8 |
-
{#-- Validate content is a list --#}
|
| 9 |
-
{%- set content = message['content'] %}
|
| 10 |
-
{%- if content is not iterable or content is string %}
|
| 11 |
-
{{- raise_exception("The content must be a list") }}
|
| 12 |
-
{%- endif %}
|
| 13 |
-
|
| 14 |
-
{#-- Collect content types --#}
|
| 15 |
-
{%- set content_types = content | map(attribute='type') | list %}
|
| 16 |
-
{%- set is_last = loop.last %}
|
| 17 |
-
|
| 18 |
-
{#-- Last message validation --#}
|
| 19 |
-
{%- if is_last %}
|
| 20 |
-
{%- if 'text' not in content_types %}
|
| 21 |
-
{{- raise_exception("The last message must include one item of type 'text'") }}
|
| 22 |
-
{%- elif (content_types | select('equalto', 'text') | list | length > 1) or (content_types | select('equalto', 'audio') | list | length > 1) %}
|
| 23 |
-
{{- raise_exception("At most two items are allowed in the last message: one 'text' and one 'audio'") }}
|
| 24 |
-
{%- endif %}
|
| 25 |
-
|
| 26 |
-
{#-- All other messages validation --#}
|
| 27 |
-
{%- else %}
|
| 28 |
-
{%- if content_types | select('equalto', 'text') | list | length != 1
|
| 29 |
-
or content_types | select('equalto', 'audio') | list | length != 1 %}
|
| 30 |
-
{{- raise_exception("Each message (except the last) must contain exactly one 'text' and one 'audio' item") }}
|
| 31 |
-
{%- elif content_types | reject('in', ['text', 'audio']) | list | length > 0 %}
|
| 32 |
-
{{- raise_exception("Only 'text' and 'audio' types are allowed in content") }}
|
| 33 |
-
{%- endif %}
|
| 34 |
-
{%- endif %}
|
| 35 |
-
{%- endfor %}
|
| 36 |
-
|
| 37 |
-
{%- for message in messages %}
|
| 38 |
-
{{- bos_token }}
|
| 39 |
-
{{- '[' + message['role'] + ']' }}
|
| 40 |
-
{{- message['content'][0]['text'] }}
|
| 41 |
-
{{- eos_token }}
|
| 42 |
-
{%- if message['content']|length > 1 %}
|
| 43 |
-
{{- '<|AUDIO|><|audio_eos|>' }}
|
| 44 |
-
{%- endif %}
|
| 45 |
-
{%- endfor %}
|
|
|
|
| 1 |
+
outetts-1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
special_tokens_map.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec54a55e3c6fc7318ea02cbd1a6eb1fb180bff1b58acbf068504a25f1b407b7b
|
| 3 |
+
size 18366636
|
tokenizer_config.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|