Instructions to use network-centrality-labs/uk-news2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use network-centrality-labs/uk-news2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="network-centrality-labs/uk-news2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("network-centrality-labs/uk-news2", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use network-centrality-labs/uk-news2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "network-centrality-labs/uk-news2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "network-centrality-labs/uk-news2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/network-centrality-labs/uk-news2
- SGLang
How to use network-centrality-labs/uk-news2 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 "network-centrality-labs/uk-news2" \ --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": "network-centrality-labs/uk-news2", "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 "network-centrality-labs/uk-news2" \ --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": "network-centrality-labs/uk-news2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use network-centrality-labs/uk-news2 with Docker Model Runner:
docker model run hf.co/network-centrality-labs/uk-news2
π° UK news-Style Article Generator (guardian1-prov)
guardian1-prov is a LoRA fine-tuned version of Googleβs Gemma-2-2B-IT, trained to generate long-form news articles in the style, tone, and structure of uk-news is a LoRA fine-tuned ... the style and structure of major UK online newspapers in 2024." The model imitates expressive British journalistic writing, headline structure, contextual openings, quotations, political commentary, and typical UK broadsheets sentence rhythm.
This model is suitable for:
- π News article generation
- βοΈ Creative writing in a journalistic tone
- π° Synthetic newsroom content
- π Data-to-text generation
- π Style-transfer experiments
This model was trained using Hugging Face AutoTrain.
π¦ Model Details
- Base model:
google/gemma-2-2b-it - Parameter-efficient training: LoRA (int4 quantization)
- Training platform: AutoTrain Advanced
- Dataset size: 1,048 broadsheet-style articles (2024)
- Training epochs: 3
- Max sequence length: 2048 tokens
- Task: Causal Language Modeling (SFT)
- Limitation: it does not not generate correct news, this generates only the style. It needs to be supplied with correct facts and human supervision.
π§ Training Dataset
The dataset used is:
theoracle/guardian_article_prov
It contains 1,048 newsarticles, each merged into a single text field: