Instructions to use Owaner/fineweb-falcon with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Owaner/fineweb-falcon with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Owaner/fineweb-falcon")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Owaner/fineweb-falcon") model = AutoModelForCausalLM.from_pretrained("Owaner/fineweb-falcon") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Owaner/fineweb-falcon with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Owaner/fineweb-falcon" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Owaner/fineweb-falcon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Owaner/fineweb-falcon
- SGLang
How to use Owaner/fineweb-falcon 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 "Owaner/fineweb-falcon" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Owaner/fineweb-falcon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Owaner/fineweb-falcon" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Owaner/fineweb-falcon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Owaner/fineweb-falcon with Docker Model Runner:
docker model run hf.co/Owaner/fineweb-falcon
Direct Use
import transformers as tfm
model = tfm.AutoModelForCausalLM.from_pretrained("Owaner/fineweb-falcon")
tokenizer = tfm.PreTrainedTokenizerFast.from_pretrained("Owaner/falcon_tokenizer")
example = "When habitually indulge in "
tokenized_input = tokenizer(example, return_tensors="pt", return_token_type_ids=False)
output = model.generate(
inputs=tokenized_input["input_ids"],
attention_mask=tokenized_input["attention_mask"],
do_sample = True,
max_length=100,
temperature=0.7,
top_k=50,
top_p=0.95,
num_return_sequences=5
)
output_text = tokenizer.batch_decode(output, skip_special_tokens=True)
for i, o in enumerate(output_text):
print(f"Output {i+1}: {o}")
- Hardware Type: Single Nvidia A80 memory 80
- Hours used: 2 hours
- Cloud Provider: DataCrunch
- Compute Region: [More Information Needed]
- Carbon Emitted: [More Information Needed]
- Downloads last month
- 5