Text Generation
Transformers
PyTorch
Safetensors
llama
Generated from Trainer
conversational
text-generation-inference
Run this model with HF Jobs
Run mhenrichsen/danskgpt-tiny-chat on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/mhenrichsen/danskgpt-tiny-chat. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/mhenrichsen/danskgpt-tiny-chat on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/mhenrichsen/danskgpt-tiny-chat. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/mhenrichsen/danskgpt-tiny-chat. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use mhenrichsen/danskgpt-tiny-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mhenrichsen/danskgpt-tiny-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mhenrichsen/danskgpt-tiny-chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mhenrichsen/danskgpt-tiny-chat") model = AutoModelForCausalLM.from_pretrained("mhenrichsen/danskgpt-tiny-chat", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mhenrichsen/danskgpt-tiny-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mhenrichsen/danskgpt-tiny-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mhenrichsen/danskgpt-tiny-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mhenrichsen/danskgpt-tiny-chat
- SGLang
How to use mhenrichsen/danskgpt-tiny-chat 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 "mhenrichsen/danskgpt-tiny-chat" \ --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": "mhenrichsen/danskgpt-tiny-chat", "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 "mhenrichsen/danskgpt-tiny-chat" \ --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": "mhenrichsen/danskgpt-tiny-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mhenrichsen/danskgpt-tiny-chat with Docker Model Runner:
docker model run hf.co/mhenrichsen/danskgpt-tiny-chat
Commit ·
f1cd101
1
Parent(s): cb20077
Update README.md
Browse files7 unmodified lines891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051067 unmodified linesresults: []---<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)<details><summary>See axolotl config</summary>axolotl version: `0.3.0````yamlbase_model: mhenrichsen/danskgpt-tinymodel_type: LlamaForCausalLMtokenizer_type: LlamaTokenizeris_llama_derived_model: trueload_in_8bit: falseload_in_4bit: falsestrict: false#pretraining_dataset: mhenrichsen/terradatasets:- path: mhenrichsen/rag-qa-sharegpttype: sharegptconversation: chatml- path: mhenrichsen/creatortype: sharegptconversation: chatml- path: mhenrichsen/puffin-sharegpt-fixtype: sharegptconversation: chatml- path: mhenrichsen/orcaslim-sharegpt-fixtype: sharegptconversation: chatml- path: mhenrichsen/dansk-tekst-sharegpttype: sharegptconversation: chatmlchat_template: chatmldataset_prepared_path:val_set_size: 0.001output_dir: ./tiny-chatsequence_len: 2048sample_packing: truepad_to_sequence_len: truewandb_project: tiny-danskgpt-chatwandb_entity:wandb_watch:wandb_name:wandb_log_model:gradient_accumulation_steps: 4micro_batch_size: 16num_epochs: 3optimizer: adamw_bnb_8bitlr_scheduler: cosinelearning_rate: 0.00005train_on_inputs: falsegroup_by_length: falsebf16: truefp16: falsetf32: falsegradient_checkpointing: trueearly_stopping_patience:resume_from_checkpoint:local_rank:logging_steps: 1xformers_attention:flash_attention: truewarmup_steps: 10evals_per_epoch: 4eval_table_size:saves_per_epoch: 2debug:deepspeed: deepspeed/zero2.jsonweight_decay: 0.1fsdp:fsdp_config:special_tokens:eos_token: "<|im_end|>"tokens:- "<|im_start|>"```</details><br># tiny-chatThis model is a fine-tuned version of [mhenrichsen/danskgpt-tiny](https://huggingface.co/mhenrichsen/danskgpt-tiny) on the None dataset.It achieves the following results on the evaluation set:7 unmodified lines891011121314157 unmodified linesresults: []---# DanskGPT-chat-tinyThis model is a fine-tuned version of [mhenrichsen/danskgpt-tiny](https://huggingface.co/mhenrichsen/danskgpt-tiny) on the None dataset.It achieves the following results on the evaluation set:
README.md+1-92