Text Generation
Transformers
Safetensors
Norwegian Nynorsk
Norwegian
t5gemma2
text2text-generation
norwegian
nynorsk
morphology
normform
🇪🇺 Region: EU
Instructions to use NbAiLab/normform-nynorsk-multitask with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NbAiLab/normform-nynorsk-multitask with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NbAiLab/normform-nynorsk-multitask")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("NbAiLab/normform-nynorsk-multitask") model = AutoModelForMultimodalLM.from_pretrained("NbAiLab/normform-nynorsk-multitask", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NbAiLab/normform-nynorsk-multitask with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NbAiLab/normform-nynorsk-multitask" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NbAiLab/normform-nynorsk-multitask", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NbAiLab/normform-nynorsk-multitask
- SGLang
How to use NbAiLab/normform-nynorsk-multitask 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 "NbAiLab/normform-nynorsk-multitask" \ --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": "NbAiLab/normform-nynorsk-multitask", "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 "NbAiLab/normform-nynorsk-multitask" \ --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": "NbAiLab/normform-nynorsk-multitask", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NbAiLab/normform-nynorsk-multitask with Docker Model Runner:
docker model run hf.co/NbAiLab/normform-nynorsk-multitask
Download config.json from NbAiLab/normform-nynorsk-multitask: direct link, hf CLI and curl.
- Browser
- Download file 6.65 kB
-
https://huggingface.co/NbAiLab/normform-nynorsk-multitask/resolve/main/config.json
- Command line
-
hf download hf://NbAiLab/normform-nynorsk-multitask/config.json
-
curl -L -o config.json https://huggingface.co/NbAiLab/normform-nynorsk-multitask/resolve/main/config.json
6.65 kB
| { | |
| "architectures": [ | |
| "T5Gemma2ForConditionalGeneration" | |
| ], | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 2, | |
| "classifier_dropout_rate": 0.0, | |
| "decoder": { | |
| "_sliding_window_pattern": 6, | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attn_logit_softcapping": null, | |
| "bos_token_id": 2, | |
| "dropout_rate": 0.0, | |
| "dtype": "float32", | |
| "eos_token_id": 1, | |
| "final_logit_softcapping": null, | |
| "head_dim": 256, | |
| "hidden_activation": "gelu_pytorch_tanh", | |
| "hidden_size": 1152, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 6912, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention" | |
| ], | |
| "max_position_embeddings": 32768, | |
| "model_type": "t5gemma2_decoder", | |
| "num_attention_heads": 4, | |
| "num_hidden_layers": 26, | |
| "num_key_value_heads": 1, | |
| "pad_token_id": 0, | |
| "query_pre_attn_scalar": 256, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "full_attention": { | |
| "factor": 8.0, | |
| "rope_theta": 1000000, | |
| "rope_type": "linear" | |
| }, | |
| "sliding_attention": { | |
| "rope_theta": 10000, | |
| "rope_type": "default" | |
| } | |
| }, | |
| "sliding_window": 512, | |
| "tie_word_embeddings": true, | |
| "use_bidirectional_attention": false, | |
| "use_cache": false, | |
| "vocab_size": 262144 | |
| }, | |
| "dropout_rate": 0.0, | |
| "dtype": "bfloat16", | |
| "encoder": { | |
| "attention_dropout": 0.0, | |
| "boi_token_index": 255999, | |
| "dropout_rate": 0.0, | |
| "dtype": "float32", | |
| "eoi_token_index": 256000, | |
| "image_token_index": 256001, | |
| "initializer_range": 0.02, | |
| "mm_tokens_per_image": 256, | |
| "model_type": "t5gemma2_encoder", | |
| "text_config": { | |
| "_name_or_path": "", | |
| "_sliding_window_pattern": 6, | |
| "add_cross_attention": false, | |
| "architectures": null, | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attn_logit_softcapping": null, | |
| "bos_token_id": 2, | |
| "chunk_size_feed_forward": 0, | |
| "cross_attention_hidden_size": null, | |
| "decoder_start_token_id": null, | |
| "dropout_rate": 0.0, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 1, | |
| "final_logit_softcapping": null, | |
| "finetuning_task": null, | |
| "head_dim": 256, | |
| "hidden_activation": "gelu_pytorch_tanh", | |
| "hidden_size": 1152, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 6912, | |
| "is_decoder": false, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention" | |
| ], | |
| "max_position_embeddings": 32768, | |
| "model_type": "t5gemma2_text", | |
| "num_attention_heads": 4, | |
| "num_hidden_layers": 26, | |
| "num_key_value_heads": 1, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pad_token_id": 0, | |
| "prefix": null, | |
| "problem_type": null, | |
| "query_pre_attn_scalar": 256, | |
| "return_dict": true, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "full_attention": { | |
| "factor": 8.0, | |
| "rope_theta": 1000000, | |
| "rope_type": "linear" | |
| }, | |
| "sliding_attention": { | |
| "rope_theta": 10000, | |
| "rope_type": "default" | |
| } | |
| }, | |
| "sep_token_id": null, | |
| "sliding_window": 512, | |
| "task_specific_params": null, | |
| "tie_encoder_decoder": false, | |
| "tie_word_embeddings": true, | |
| "tokenizer_class": null, | |
| "use_bidirectional_attention": false, | |
| "use_cache": true, | |
| "vocab_size": 262144 | |
| }, | |
| "tie_word_embeddings": true, | |
| "vision_config": { | |
| "_name_or_path": "", | |
| "add_cross_attention": false, | |
| "architectures": null, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": null, | |
| "chunk_size_feed_forward": 0, | |
| "cross_attention_hidden_size": null, | |
| "decoder_start_token_id": null, | |
| "dropout_rate": 0.0, | |
| "dtype": "bfloat16", | |
| "eos_token_id": null, | |
| "finetuning_task": null, | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 1152, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "image_size": 896, | |
| "intermediate_size": 4304, | |
| "is_decoder": false, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "layer_norm_eps": 1e-06, | |
| "model_type": "siglip_vision_model", | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 27, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pad_token_id": null, | |
| "patch_size": 14, | |
| "prefix": null, | |
| "problem_type": null, | |
| "return_dict": true, | |
| "sep_token_id": null, | |
| "task_specific_params": null, | |
| "tie_encoder_decoder": false, | |
| "tie_word_embeddings": true, | |
| "tokenizer_class": null, | |
| "vision_use_head": false, | |
| "vocab_size": 262144 | |
| }, | |
| "vocab_size": 262144 | |
| }, | |
| "eoi_token_index": 256000, | |
| "eos_token_id": 1, | |
| "image_token_index": 256001, | |
| "initializer_range": 0.02, | |
| "is_encoder_decoder": true, | |
| "model_type": "t5gemma2", | |
| "pad_token_id": 0, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.16.1", | |
| "use_cache": false, | |
| "vocab_size": 262144 | |
| } | |