Instructions to use jadidbourbaki/iceberg-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jadidbourbaki/iceberg-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jadidbourbaki/iceberg-1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("jadidbourbaki/iceberg-1") model = AutoModelForMultimodalLM.from_pretrained("jadidbourbaki/iceberg-1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jadidbourbaki/iceberg-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jadidbourbaki/iceberg-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jadidbourbaki/iceberg-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jadidbourbaki/iceberg-1
- SGLang
How to use jadidbourbaki/iceberg-1 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 "jadidbourbaki/iceberg-1" \ --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": "jadidbourbaki/iceberg-1", "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 "jadidbourbaki/iceberg-1" \ --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": "jadidbourbaki/iceberg-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jadidbourbaki/iceberg-1 with Docker Model Runner:
docker model run hf.co/jadidbourbaki/iceberg-1
iceberg-1
iceberg-1 writes prose in Ernest Hemingway's voice. Ask it for a scene and it answers in flat declarative sentences, carried by dialogue.
The model is google/gemma-4-E4B-it with one stage of supervised fine-tuning applied through low-rank adaptation (LoRA). No reinforcement learning ran here, and no preference tuning ran either.
The name comes from Hemingway's iceberg theory. He held that a story draws its force from what the writer leaves out, so only one eighth of it shows above the water.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("jadidbourbaki/iceberg-1")
tokenizer = AutoTokenizer.from_pretrained("jadidbourbaki/iceberg-1")
Training Method
Style lives in every token of a training completion. Supervised fine-tuning learns from every token, so one supervised stage is enough for this job.
The training pairs came from reverse instructions, the technique in Köksal et al. 2023. Claude read each Hemingway passage and wrote the instruction that would have produced it. The passage then became the target completion for that instruction.
The direction matters. Training on raw novel text produces a model that continues a Hemingway passage. Reverse instructions produce a model that answers a request in his voice.
Instructions that named the author or described the style were dropped. An instruction asking for terse sentences teaches the voice as a mode to switch on when asked. The goal was a default voice instead.
The adapter is rank 32 on the attention and feed-forward projections. Training ran for three epochs in bfloat16 with no quantization.
Training Data
Three Hemingway novels supplied every training completion. United States copyright runs 95 years from publication, and all three novels appeared before 1930.
- A Farewell to Arms (1929)
- The Sun Also Rises (1926)
- Men Without Women (1927)
The corpus is public domain in the United States. Copyright elsewhere runs longer. The European Union and the United Kingdom grant the author's life plus 70 years, and Hemingway died in 1961. The same three novels stay protected there until 2032. The training set is therefore not published.
Limitations
The training set holds 918 examples, and the model saw each one three times. Repetition at that scale can teach a model to reproduce its source verbatim, so the output was measured for it.
Hemingway sets the threshold. In Our Time never trained the model, and its longest verbatim span shared with the three training novels is seven words. It shares no eight word span at all. An eight word match is therefore reproduction rather than ordinary English or an author's habit.
Generated samples shared no span of six words or more with the 192,990 word
training corpus. No memorisation was detected. The repository ships the
measurement as hemingway-memorization, so the claim can be rechecked against
any output rather than taken on trust.
Style tuning narrows a model. Expect weaker instruction following on requests that are not for prose.
License
This model is a Model Derivative of Gemma. The Gemma Terms of Use
govern it. The license: gemma declaration on this repository carries that
agreement to every recipient.
The use restrictions in Section 3.2 of those terms pass forward. Anyone who uses this model or redistributes it is bound by them.
The weights are modified from google/gemma-4-E4B-it.
- Downloads last month
- 466