Run this model with HF Jobs
Run SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct 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/SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct. 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/SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct 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/SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct. 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/SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct. 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 SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct") 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("SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct") model = AutoModelForCausalLM.from_pretrained("SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct", 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 SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct
- SGLang
How to use SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct 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 "SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct" \ --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": "SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct", "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 "SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct" \ --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": "SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct with Docker Model Runner:
docker model run hf.co/SemanticAlignment/Llama-3.1-8B-Italian-LAPT-instruct
Upload tokenizer
Browse filesFiles changed (3)
1234{{ '<s>' }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% endif %}{% if system_message is defined %}{{ '<|start_header_id|>system<|end_header_id|>' + system_message + '<|eot_id|>' }}{% endif %}{% for message in loop_messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|start_header_id|>user<|end_header_id|>1234{{ '<|begin_of_text|>' }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% endif %}{% if system_message is defined %}{{ '<|start_header_id|>system<|end_header_id|>' + system_message + '<|eot_id|>' }}{% endif %}{% for message in loop_messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|start_header_id|>user<|end_header_id|>
12342 unmodified lines7891011121314151617181920{"bos_token": {"content": "<|begin_of_text|>","lstrip": false,2 unmodified lines"single_word": false},"eos_token": {"content": "<|end_of_text|>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},"pad_token": {"content": "<|end_of_text|>","lstrip": false,"normalized": false,"rstrip": false,12345672 unmodified lines1011121314151617181920212223{"additional_special_tokens": ["<|eom_id|>"],"bos_token": {"content": "<|begin_of_text|>","lstrip": false,2 unmodified lines"single_word": false},"eos_token": {"content": "<|eot_id|>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},"pad_token": {"content": "<|eot_id|>","lstrip": false,"normalized": false,"rstrip": false,
2048 unmodified lines20492050205120522053205420552056205720582059206020612062206320642048 unmodified lines"special": true}},"bos_token": "<|begin_of_text|>","clean_up_tokenization_spaces": true,"eos_token": "<|end_of_text|>","extra_special_tokens": {},"model_input_names": ["input_ids","attention_mask"],"model_max_length": 8192,"pad_token": "<|end_of_text|>","padding_side": "right","split_special_tokens": false,"tokenizer_class": "PreTrainedTokenizerFast"2048 unmodified lines20492050205120522053205420552056205720582059206020612062206320642065206620672048 unmodified lines"special": true}},"additional_special_tokens": ["<|eom_id|>"],"bos_token": "<|begin_of_text|>","clean_up_tokenization_spaces": true,"eos_token": "<|eot_id|>","extra_special_tokens": {},"model_input_names": ["input_ids","attention_mask"],"model_max_length": 8192,"pad_token": "<|eot_id|>","padding_side": "right","split_special_tokens": false,"tokenizer_class": "PreTrainedTokenizerFast"
chat_template.jinja+1-1
special_tokens_map.json+5-2
tokenizer_config.json+5-2