Instructions to use Alijeff1214/DeutscheLexAI_BGB with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alijeff1214/DeutscheLexAI_BGB with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Alijeff1214/DeutscheLexAI_BGB") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Alijeff1214/DeutscheLexAI_BGB") model = AutoModelForCausalLM.from_pretrained("Alijeff1214/DeutscheLexAI_BGB", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Alijeff1214/DeutscheLexAI_BGB with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Alijeff1214/DeutscheLexAI_BGB" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alijeff1214/DeutscheLexAI_BGB", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Alijeff1214/DeutscheLexAI_BGB
- SGLang
How to use Alijeff1214/DeutscheLexAI_BGB 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 "Alijeff1214/DeutscheLexAI_BGB" \ --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": "Alijeff1214/DeutscheLexAI_BGB", "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 "Alijeff1214/DeutscheLexAI_BGB" \ --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": "Alijeff1214/DeutscheLexAI_BGB", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use Alijeff1214/DeutscheLexAI_BGB 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 Alijeff1214/DeutscheLexAI_BGB 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 Alijeff1214/DeutscheLexAI_BGB to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Alijeff1214/DeutscheLexAI_BGB to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Alijeff1214/DeutscheLexAI_BGB", max_seq_length=2048, ) - Docker Model Runner
How to use Alijeff1214/DeutscheLexAI_BGB with Docker Model Runner:
docker model run hf.co/Alijeff1214/DeutscheLexAI_BGB
- Model Card for Model ID
- Model Details
- Uses
- Bias, Risks, and Limitations
- How to Get Started with the Model
- Training Details
- Evaluation
- Model Examination [optional]
- Environmental Impact
- Technical Specifications [optional]
- Citation [optional]
- Glossary [optional]
- More Information [optional]
- Model Card Authors [optional]
- Model Card Contact
Model Card for Model ID
Model Details
Model Description
DeutscheLexAI_BGB is a fine-tuned Qwen2.5-3B model specializing in German legal text processing, trained on the Bürgerliches Gesetzbuch (BGB) dataset. It enhances legal text understanding, summarization, and reasoning for German legal documents.
- Developed by: [Ali Asghar (jaffry258@gmail.com)]
- Funded by [optional]: [still under progress ]
- Shared by [optional]: []
- Model type: [Large Language Model (LLM)]
- Language(s) (NLP): [pytorch,transformers,python]
- License: [Appache 2.0]
- Finetuned from model [optional]: [Qwen2.5-3B]
Model Sources [optional]
- Repository: [https://huggingface.co/Alijeff1214/DeutscheLexAI_BGB/tree/main]
- Paper [optional]: [More Information Needed]
- Demo [optional]: [More Information Needed]
Uses
DeutscheLexAI_BGB is a fine-tuned Qwen2.5-3B model specializing in German legal text processing, trained on the Bürgerliches Gesetzbuch (BGB) dataset. It enhances legal text understanding, summarization, and reasoning for German legal documents.
Direct Use
Legal research: Extract, summarize, and analyze BGB texts.
AI-powered legal assistants: Provide insights into German law.
Academic purposes: Assists in legal document structuring.
[More Information Needed]
Downstream Use [optional]
Chatbots for legal guidance.
AI-based contract analysis.
[More Information Needed]
Out-of-Scope Use
[More Information Needed]
Bias, Risks, and Limitations
The model may reflect biases in the BGB dataset.
Not suitable for real-time legal decision-making.
Might struggle with non-German legal texts.
[More Information Needed]
Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
Training Details
Training Data
[More Information Needed]
Training Procedure
Preprocessing [optional]
[More Information Needed]
Training Hyperparameters
- Training regime: [More Information Needed]
- trainer = GRPOTrainer( model = model, processing_class = tokenizer, reward_funcs = [ xmlcount_reward_func, soft_format_reward_func, strict_format_reward_func, int_reward_func, correctness_reward_func, ], args = training_args, train_dataset = dataset, ) trainer.train()
Speeds, Sizes, Times [optional]
[More Information Needed]
Evaluation
Testing Data, Factors & Metrics
Testing Data
[More Information Needed]
Factors
[More Information Needed]
Metrics
[More Information Needed]
Results
[More Information Needed]
Summary
Model Examination [optional]
[More Information Needed]
Environmental Impact
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
- Hardware Type: [More Information Needed]
- Hours used: [More Information Needed]
- Cloud Provider: [More Information Needed]
- Compute Region: [More Information Needed]
- Carbon Emitted: [More Information Needed]
Technical Specifications [optional]
Model Architecture and Objective
[More Information Needed]
Compute Infrastructure
[More Information Needed]
Hardware
[More Information Needed]
Software
[More Information Needed]
Citation [optional]
@article{DeutscheLexAI_BGB, title={DeutscheLexAI_BGB: A Fine-Tuned Qwen2.5-3B Model for German Legal Texts}, author={Your Name or Organization}, journal={Hugging Face Model Hub}, year={2025}, url={https://huggingface.co/Alijeff1214/DeutscheLexAI_BGB} }
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
Glossary [optional]
[More Information Needed]
More Information [optional]
[More Information Needed]
Model Card Authors [optional]
[More Information Needed]
Model Card Contact
[More Information Needed]
- Downloads last month
- 9