Instructions to use bineric/NorskGPT-Llama-3-70b-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bineric/NorskGPT-Llama-3-70b-adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bineric/NorskGPT-Llama-3-70b-adapter") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bineric/NorskGPT-Llama-3-70b-adapter") model = AutoModelForCausalLM.from_pretrained("bineric/NorskGPT-Llama-3-70b-adapter", 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 bineric/NorskGPT-Llama-3-70b-adapter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bineric/NorskGPT-Llama-3-70b-adapter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bineric/NorskGPT-Llama-3-70b-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bineric/NorskGPT-Llama-3-70b-adapter
- SGLang
How to use bineric/NorskGPT-Llama-3-70b-adapter 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 "bineric/NorskGPT-Llama-3-70b-adapter" \ --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": "bineric/NorskGPT-Llama-3-70b-adapter", "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 "bineric/NorskGPT-Llama-3-70b-adapter" \ --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": "bineric/NorskGPT-Llama-3-70b-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use bineric/NorskGPT-Llama-3-70b-adapter with Docker Model Runner:
docker model run hf.co/bineric/NorskGPT-Llama-3-70b-adapter
NorskGPT-Llama-3-70b-v0.1-adapter
This is a Norwegian adapter for Llama-3-70b-fp16, where the model was trained on 1M tokens from Norwegian text. It should be used as a base model, that would need more training in order to be able to chat with the user.
Intended Use
This model is free to use for personal and research use. However a commercial license is required for commerical applications.
Limitations
- This is an LLM, not a knowledge model. It can not be expected to have more information about Norway than the base model.
- It will generally preform better on tasks that involves summarization, question answering and chat, than on tasks that requires more knowledge about Norway, specific domains, or tasks where the model can answer freely.
- The model is released as is, and would in most cases need prompt tuning to achieve optimal results.
License
Attribution-NonCommercial-ShareAlike 4.0 International
This model is free to use for personal and research use. However a commercial license is required for commerical applications.
You are free to:
Share โ copy and redistribute the material in any medium or format
Adapt โ remix, transform, and build upon the material
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution โ You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
NonCommercial โ You may not use the material for commercial purposes .
ShareAlike โ If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions โ You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
- Downloads last month
- 14
Model tree for bineric/NorskGPT-Llama-3-70b-adapter
Base model
casperhansen/llama-3-70b-fp16